Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. MailMessage Problem

MailMessage Problem

Scheduled Pinned Locked Moved ASP.NET
helpcomdata-structuresquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    the pink jedi
    wrote on last edited by
    #1

    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

    I M 2 Replies Last reply
    0
    • T the pink jedi

      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

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      I got the same thing also. It would take 3 minutes for the email to go. But it still went. I just wrote my own SMTP use RFC 821. Nick 1 line of code equals many bugs. So don't write any!!

      1 Reply Last reply
      0
      • T the pink jedi

        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

        M Offline
        M Offline
        mr_debasishdas
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups