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