簡體   English   中英

如何在C#中更改發件人電子郵件地址?

[英]How can I change the Sender Email Address in C#?

    public static void emailSenden(object mail, string example)
    {

        MailItem answeremail = (mail as MailItem).Reply();

這是我嘗試做的,但是沒有用。

        (mail as MailItem).SenderEmailAddress ??? 

代碼看起來如何更改發件人電子郵件地址?

// 此回復中發件人電子郵件地址應為“我的電子郵件地址 ”;

這部分是回復郵件的“正文”部分:

        answeremail.HTMLBody = "<p> Completion not possible. Can you complete </p>" + example +
            "<br>" +
            "<p> manually</p>" +
            "<br>" +
            "<p>See you</p>" +
            "<br>" +
            "<p>Sala</p>";

        answermail.Send();

    }

嘗試使用MailItem.Sender,它返回收件人

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM