email problem in asp.net
Hello,
I am using smtp email in asp.net.
following is the code
Dim obj As System.Web.Mail.SmtpMail
Dim MailReportAttachment As System.Web.Mail.MailAttachment
Dim Mailmsg As New System.Web.Mail.MailMessage
Dim vSmtpServer As String = ConfigurationSettings.AppSettings("EmailServer")
Try
obj.SmtpServer = vSmtpServer
Mailmsg.To = vMailMsgto
Mailmsg.Cc = vMailMsgCC
Mailmsg.From = "\" & vFromDisplayName & "\ <" & vFromMsg & ">"
Mailmsg.BodyFormat = Mail.MailFormat.Text
Mailmsg.Subject = vSubject
Mailmsg.Body = vMsgBody
obj.Send(Mailmsg)
Catch ex As Exception
Throw ex
End Try
here i am passing valid From , To , CC addresses also i am passing proper SMTP address. I am passing string to CC address sepearated by semicolon (;). but email does not go to all people. some people receives it and some does not. This is working fine in some cases but does not work properly in some cases. It does not even throw error message.
Can anyone please help me?
Thanks
|