none
How do I add a cc or BCC through a transport agent? RRS feed

  • Question

  • 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", "wangdasheng@hundun.com"));
            } 
    }

    It doesn't work when I write it like this.

    How do I add a Cc  through a transport agent?

    Thursday, April 2, 2020 4:38 PM

All replies

  • Hi,

    Thanks for visiting our forum, here we mainly focus on general issues about Outlook desktop client but your question is more related to Exchange server developement . So I'll move your thread to the dedicated forum for Exchange server developement.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thanks for your understanding and hope your question will be resolved soon.

    Regards,

    Aidan Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, April 3, 2020 2:15 AM