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. The requested body part was not found in this message.

The requested body part was not found in this message.

Scheduled Pinned Locked Moved ASP.NET
htmldatabasecomhelpworkspace
2 Posts 2 Posters 1 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.
  • B Offline
    B Offline
    banker_kiran
    wrote on last edited by
    #1

    Hi, When i am sending mail, then sometimes its give me error like The requested body part was not found in this message. I am getting body part from database. It is html. When i am sending only ok as body, then its work. I am not getting the reason, some times it works , some times its not. My Code Dim smtp As SmtpMail Dim mm As New System.Web.Mail.MailMessage mm.From = mailFrom mm.To = mailTo mm.Cc = mailCC mm.Subject = mailSubject smtp.SmtpServer = smtpServer mm.Body =sBody mm.BodyFormat = MailFormat.Html mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", iAuthenticate) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", sUsername) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", sPassword) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", iPort) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", sSSL) Try smtp.Send(mm) Catch ex As Exception Throw ex

    kiran banker

    J 1 Reply Last reply
    0
    • B banker_kiran

      Hi, When i am sending mail, then sometimes its give me error like The requested body part was not found in this message. I am getting body part from database. It is html. When i am sending only ok as body, then its work. I am not getting the reason, some times it works , some times its not. My Code Dim smtp As SmtpMail Dim mm As New System.Web.Mail.MailMessage mm.From = mailFrom mm.To = mailTo mm.Cc = mailCC mm.Subject = mailSubject smtp.SmtpServer = smtpServer mm.Body =sBody mm.BodyFormat = MailFormat.Html mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", iAuthenticate) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", sUsername) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", sPassword) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", iPort) mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", sSSL) Try smtp.Send(mm) Catch ex As Exception Throw ex

      kiran banker

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      banker_kiran wrote:

      I am not getting the reason, some times it works , some times its not.

      It could be the problem of your SMTP Server. Not sure...

      Regards
       - J O N -


      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