我從我的ASP.net頁面發送消息給一個電子郵件帳戶,該消息正確發送並且可以在Thunderbird或任何瀏覽器中查看我用的其他電子郵件客戶端從.net發送的消息System.Net.Mail在BlackJack II上不可見Windows Mobile
但我無法查看我的Windows Mobile 6.1(二十一點二)設備的消息文本,我已經設置
msg.BodyEncoding = System.Text.Encoding.Unicode;
或
玩耍了msg.BodyEncoding = System.Text.Encoding.UTF8;
甚至
msg.BodyEncoding = System.Text.Encoding.ASCII;
但這些工作和消息正文都沒有在設備上顯示。
代碼發送消息低於
凡身體是一個ASP.net TextBox控件
try
{
MailMessage msg = new MailMessage("[email protected]", "[email protected]");
msg.Subject = "[TestProduct - TestPage.aspx]";
msg.Body = Body.Text;
msg.IsBodyHtml = true;
SmtpClient sc = new SmtpClient("localhost");
sc.Send(msg);
txtMsg.Text = "Thank you for contacting TestCompany Inc someone will contact you promptly.";
}
catch
{
txtMsg.Text = "Unable to send your message at this time, Please try again later. Sorry for inconvineance.";
}
當IsBodyHtml =假,我不設置編碼這些標題,我收到
From - Tue Jun 09 11:48:23 2009
Received: from chronos ([127.0.0.1]) by chronos.lunarpages.com with MailEnable ESMTP; Tue, 09 Jun 2009 11:45:09 -0700
MIME-Version: 1.0
From: Removed
To: Removed
Date: 9 Jun 2009 11:45:09 -0700
Subject: [TestProduct - TestPage.aspx]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Return-Path: <Removed>
test this message
仍然我無法在設備中看到它。
你確定你的信息BOD y(Body.Text)是HTML嗎? – SLaks 2009-06-09 18:15:07
我試過用IsBodyHtml = false,實際上body不是html和簡單文本 – AppDeveloper 2009-06-09 18:17:54
移動設備上發生了什麼? 您可以看到該消息,但它沒有任何文字? – SLaks 2009-06-09 18:23:37