Hi,
I'm sending a message from my ASP.net page to an email account, the message is sent properly and is viewable in Thunderbird or any other email client I use.
But I can not view the message text in my Windows Mobile 6.1 (BlackJacK II) device, I've played around with setting
msg.BodyEncoding = System.Text.Encoding.Unicode;
or
msg.BodyEncoding = System.Text.Encoding.UTF8;
or even
msg.BodyEncoding = System.Text.Encoding.ASCII;
but none of these work and message body is simply not visible on the device.
the code to send the message is below
Where Body is an ASP.net TextBox control
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.";
}
When the IsBodyHtml = false and I do not set the Encoding these are the headers that I receive
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:
test this message
and still I'm unable to see it in device.