开发者

gmail Conversation via smtp

how can i send an email a开发者_开发问答s a part of a gmail-conversation via smtp? Taking the same subject doesnt work...

tell me if you need more infos... thanks in advance!

        MailMessage mail = new MailMessage();
        SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");

        mail.From = new MailAddress("@googlemail.com");
        mail.To.Add("@.com");
        mail.Subject = "(Somee.com notification) New order confirmation";
        mail.Body = "(Somee.com notification) New order confirmation";

        SmtpServer.Port = 587;
        SmtpServer.Credentials = new System.Net.NetworkCredential("", "");
        SmtpServer.EnableSsl = true;

        SmtpServer.Send(mail);


You'll need to use the following:

mail.Headers.Add("In-Reply-To", <messageid>);

The message id you should be able to get from the previous email's headers. Just look for "Message-Id".

This answer gives a few more headers you may want to add to try help threading in other clients. It seems maybe gmail is now using these, too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜