私のASP.netページから電子メールアカウントにメッセージを送信しています。メッセージは正しく送信され、Thunderbirdまたは私が使用する他の電子メールクライアント。から送信されたメッセージ.Net System.Net.Mailから送信されたメッセージは、BlackJack II Windows Mobileでは表示されません。
しかし、私は私のWindows Mobile 6.1(ブラックジャックII)デバイスでのメッセージのテキストを表示することができない、私は
msg.BodyEncoding = System.Text.Encoding.Unicode;
または
msg.BodyEncoding = System.Text.Encoding.UTF8;
あるいは
を設定すると周りにプレイしましたmsg.BodyEncoding = System.Text.Encoding.ASCII;
これらの作業とメッセージの本文は、デバイス上では見えません。
メッセージを送信するためのコードは、体が
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は=偽ASP.net TextBoxコントロールであると、私はこれらが私のヘッダーいるエンコーディングを設定していない
を下回っています受信
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
私はIsBodyHtml = falseでも試してみましたが、実際にBodyはhtmlと単純なテキストではありません – AppDeveloper
モバイルデバイスではどうなりますか? メッセージは表示されますが、テキストは表示されません。 – SLaks