English 中文(简体)
Why doesn t the BizTalk 2009 SMTP Adapter support BCC and Priority?
原标题:

When looking at http://msdn.microsoft.com/en-us/library/aa560648(BTS.10).aspx I couldn t find BCC or Priority, so I m sure it s not supported.

But why ?

最佳回答

For the why of BCC and Priority missing from the SMTP Adapter, no idea I m afraid - it has been missing from BizTalk since the first release of the product. You d probably have to ask the BizTalk product team and I imagine they would just shrug.

There are however, a couple of work-arounds to add in the BCC and priority.

The first work around is an out and out hack, but fast to implement - send two emails, with the second being your BCC list that mentions that it is a BCC. Ugly and sure to come back and bite you. (this only works for the priority)

The second way is more correct but also more work - create your own SMTP adapter that supports these properties. The System.Net.Mail namespace contains all you will need to roll your own adapter that supports BCC.

The code example below comes from MSDN:

MailAddress from = new MailAddress("ben@contoso.com", "Ben Miller");
MailAddress to = new MailAddress("jane@contoso.com", "Jane Clayton");
MailMessage message = new MailMessage(from, to);
message.Subject = "Using the SmtpClient class.";
message.Body = @"The body test to send.";
message.Priority = MailPriority.High;

MailAddress bcc = new MailAddress("manager1@contoso.com");
message.Bcc.Add(bcc);

SmtpClient client = new SmtpClient(server);
client.Send(message);

You could even avoid the overhead of an adapter and implement this as a referenced assembly - the downside of doing it that way is that when using an adapter you automatically get plugged into the BizTalk messaging framework and its features such as tracking.

问题回答

暂无回答




相关问题
Bounced email parsing

I m currently having a mess about with catching, parsing and sorting bounced emails. I have the basics set up nicely and it does what I want, which is nice... problem being is that there seems to be ...

Sending Email through .NET code

I m unable to send an email to yahoo server as my code is throwing exception as Failure Sending mail in C# 2008. Please provide SMTP HostName, PortName for yahoo server and gmail server. And also ...

parsing response end with extended SMTP (ESMTP)

To use an example response from google when sent "EHLO": 250-mx.google.com at your service, [66.501.941.15] 250-SIZE 35651584 250-8BITMIME 250-AUTH LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250 PIPELINING ...

ASP.NET MVC Web Config Email Settings

I m trying to include some SMTP settings in my ASP.NET MVC project by adding the following to my Web.Config file: <system.net> <mailSettings> <smtp> <network ...

postfix relay failover [closed]

Is there a way to configure postfix to use a relay only if direct delivery is rejected? The case being a web application that has to send notification to subscribers, but some servers reject the ...

IIS SMTP Server

I am trying to set up an SMTP server on a virtual private server. I have typically hosted applications with hosting companies in the past. I am using SMPT on a website to send mail but need to ...

IIS6 SMTP Service and stop Delivery Reties?

Is there anyway to tell the SMTP service to stop trying to resend an e-mail that has been tried / failes x amount of times ? I can t find anything in the delivery tab to speicify this. Just curious if ...

Writing my own SMTP server [closed]

I am writing a simple SMTP server and client. Server is in two parts receiver-SMTP and Sender SMTP. both will run in two different daemon services. The two modes this can run in is remote and local ...

热门标签