public override RoutingAgent CreateAgent(SmtpServer server)
{
return new MyAgent(server);
}
public class MyAgent : RoutingAgent
{
public MyAgent(SmtpServer server)
{
this.OnSubmittedMessage += MyAgent_OnSubmittedMessage;
}
private void MyAgent_OnSubmittedMessage(SubmittedMessageEventSource source, QueuedMessageEventArgs e)
{
e.MailItem.Message.Bcc.Add(new EmailRecipient("wangdasheng", "*** 因为隐私原因删除电子邮件地址 ***"));
}
}It doesn't work when I write it like this.How do I add a cc or BCC through a transport agent? 您好:当前论坛主要负责Office客户端产品的问题反馈及讨论。很抱歉您的这个问题已经超出了这边的技术支持范围。建议您到TechNet论坛获取更多帮助:http://social.technet.microsoft.com/Forums/office/zh-CN/home在合适的论坛发布您的问题,有助于您获得更多的来自于有经验的用户的。同时其他用户也能从您的问题中获益。感谢您的理解!