MailMessage Problem
-
MailMessage msg = new MailMessage(); msg.BodyEncoding = Encoding.UTF8; msg.BodyFormat = MailFormat.Text; msg.Body = "short chars"; //works fine //below doesn't work msg.Body = "longchar" + "\n\n\n----------------------------------------------------\n" + "This Message is brought you by:\n" + "http://www.ohWhyMailMessageAgain.com"; Can anyone explain the reason me? Seems like MailMessage.Body only works with short messages. When the message gets longer, the email will be stuck in the Queue folder, but the queue .eml file looks fine to me when i view it with outlook express Thanks alot
-
MailMessage msg = new MailMessage(); msg.BodyEncoding = Encoding.UTF8; msg.BodyFormat = MailFormat.Text; msg.Body = "short chars"; //works fine //below doesn't work msg.Body = "longchar" + "\n\n\n----------------------------------------------------\n" + "This Message is brought you by:\n" + "http://www.ohWhyMailMessageAgain.com"; Can anyone explain the reason me? Seems like MailMessage.Body only works with short messages. When the message gets longer, the email will be stuck in the Queue folder, but the queue .eml file looks fine to me when i view it with outlook express Thanks alot
-
MailMessage msg = new MailMessage(); msg.BodyEncoding = Encoding.UTF8; msg.BodyFormat = MailFormat.Text; msg.Body = "short chars"; //works fine //below doesn't work msg.Body = "longchar" + "\n\n\n----------------------------------------------------\n" + "This Message is brought you by:\n" + "http://www.ohWhyMailMessageAgain.com"; Can anyone explain the reason me? Seems like MailMessage.Body only works with short messages. When the message gets longer, the email will be stuck in the Queue folder, but the queue .eml file looks fine to me when i view it with outlook express Thanks alot
Hi Its ony a suggestion, I think you nee to investigate as the following line. 'Send the email in text format msg.BodyFormat = MailFormat.Text '(to send HTML format, change MailFormat.Text to MailFormat.Html) :) DD Debasish Das(MBA), is a hardcore software solution provider, working in ESSPL (INDIA). Got 5 years of experience on various client server technologies like Visual Basic,.NET framework, Power Builder, Message Queue Server. And also posses sound knowledge in Quality Processes applied to software engineering. Quite often travels overseas to provide solutions to some fortune 100 clients. He can be reached with mr_debasishdas@hotmail.com or debasishd@esspl.com