我有一个我用于客户的邮箱。此邮箱由Microsoft Outlook.com帐户托管。我的一位客户有一个简单的html表单,向潜在客户发送一个问题。我的客户希望能够按回复按钮回答潜在客户,但回复按钮取代邮箱的地址而不是potentiel客户端。
经过一些搜索,我发现我应该使用MailMessage中的ReplyToList属性,如下所示:
using (SmtpClient client = new SmtpClient(hostType.GetStringValue()))
{
client.Credentials = new NetworkCredential("mymailbox@outlook.com", "password...");
client.Port = 587;
client.EnableSsl = true;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
MailMessage mail = new MailMessage();
mail.From = new MailAddress(from, displayName);
mail.To.Add(new MailAddress(to));
mail.Subject = subject;
mail.Body = body;
mail.IsBodyHtml = true;
//mail.Headers.Add("Reply-To", from);
mail.ReplyToList.Add(new MailAddress(from, from));
client.Send(mail);
}
但即使我使用带有好电子邮件的ReplyToList进行回复,收到邮件时也不会显示在邮件电子邮件中,并始终使用邮箱电子邮件进行回复。我也尝试了这个lign mail.Headers.Add(“回复”,来自)和同样的事情,它根本不起作用。
我不知道错误是来自代码还是别的。我知道他们在这里是类似的问题,但没有一个能帮我找到问题所在。你能帮帮我吗?
谢谢
大卫
修改
要回复评论,请点击以下电子邮件标题:
x-store-info:Ru8Mzrcu9Bi87krfImffoGU6zyI7zQxEvOPZ2rK0dFZ7097nDfd6ek7w9Zo+0dIdkwOjoTvfxm39R/HFDWkTjHKx37BnOMvMx3ikCdv+Ti1zouZfOJNhdi0UesxIunTuXb9aDo5lYZn/mBjX9exoOQ==
Authentication-Results: hotmail.com; spf=pass (sender IP is 65.55.111.151; identity alignment result is pass and alignment mode is relaxed) smtp.mailfrom=personal@outlook.com; dkim=none (identity alignment result is pass and alignment mode is relaxed) header.d=outlook.com; x-hmca=pass header.id=personal@outlook.com
X-SID-PRA: personal@outlook.com
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MTtsPTE7YT0wO0Q9MDtHRD0wO1NDTD0w
X-Message-Info: AuEzbeVr9u6HQKaFYM906LZRg1/fKCemI6F8hsVqDK/cRhyWcfCskLrBvc6tf6Nt2f3mLuWB1aG5a4aKtvgsb8QulTahVJI3WiKL+LzmlinUXoKUxMSlL5SExQmWjDag7yYAqWPjZJQBwcE4mdCVLmc58u0WT9FKZ0bYocaPAimZIqgbgseTAC6SiZkOqZCAbbdKUUXqIXwTucr4KDlUm3osrC7jxtWV
Received: from BLU004-OMC4S12.hotmail.com ([65.55.111.151]) by COL004-MC4F1.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008);
Fri, 24 Apr 2015 18:27:23 -0700
Received: from BLU437-SMTP70 ([65.55.111.137]) by BLU004-OMC4S12.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751);
Fri, 24 Apr 2015 18:27:22 -0700
X-TMN: [Z36r265S9PB3a1But/h40fTfJhU3wcWq]
X-Originating-Email: [personal@outlook.com]
Message-ID: <BLU437-SMTP70CC72A0993FA1D7935A8286EB0@phx.gbl>
Return-Path: personal@outlook.com
MIME-Version: 1.0
From: Hello <personal@outlook.com>
To: personal@outlook.com
Date: Fri, 24 Apr 2015 21:27:28 -0400
Subject: email subject goes here
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-OriginalArrivalTime: 25 Apr 2015 01:27:21.0540 (UTC) FILETIME=[FA048840:01D07EF6]
Testing replying message