how can i send an email as 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With