Strange problem in sending emails by asp.net

liunx

Guest
I use the following code to send email, and strange thing that I received the message at hotmail mail, and failed to receive it at yahoo mail, could you help me and explain what happened and how to overcome this.

Regards
Serag Farag


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msgmail As System.Web.Mail.MailMessage
Dim SmtpMail As System.Web.Mail.SmtpMail
msgmail = New System.Web.Mail.MailMessage
' SmtpMail =
msgmail.To = "[email protected]"
msgmail.Cc = "[email protected]"
msgmail.From = "[email protected]"
msgmail.Subject = "subject of ggggggggggggggmsg"
msgmail.BodyFormat = System.Web.Mail.MailFormat.Html
msgmail.Body = " what u send mail ofgh ghgf ghr msgs"

SmtpMail.SmtpServer = "serag-0ivd22eow"
smtpmail.send(msgmail)
Response.Write("msg recived")
End SubI recently ran into this same problem, only mine was the exact opposite! I could send to Yahoo just fine, but hotmail wasn't receiving any of my messages.

I still have yet to figure out why it's happening...The problem most likely is not with your code. If it sends the email to one address then the code is working fine. Most likely either Yahoo or Hotmail thinks the email is spam and is blocking it. Try using a real email account (not a free one).

Good luck!

Casey Crookston
<!-- w --><a class="postlink" href="http://www.InternetOpus.com">www.InternetOpus.com</a><!-- w -->
 
Back
Top