email to-> hotmail problem (DiscountASP)

  • Thread starter Thread starter Jassim
  • Start date Start date
for your info, the same code is working fine for all emails excpt
hotmail.com

here is the code:
MailMessage mail_message = new MailMessage();
SmtpClient smtp_client = new SmtpClient("localhost");

string html_message = null;

html_message = "<html>";
html_message += "<head>";
html_message += "<meta http-equiv=Content-Type
content='text/html; charset=windows-1252'>";
html_message += "</head>";
html_message += "<body>";
html_message += "Thank you for registering with zatoor.com
and welcome to the world of free classifieds. We hope you will enjoy using
our website.";
html_message += "<br><br>";
html_message += "Please click on the following link to
activate your account:";
html_message += "<br>";
html_message += "<a
href='http://www.zatoor.com/activate.aspx'>CLICK HERE TO ACTIVATE YOUR
ACCOUNT</a>";
html_message += "<br><br>";
html_message += "zatoor.com Team";
html_message += "</body>";
html_message += "</html>";

mail_message.From = new MailAddress("(e-mail address removed)",
"zatoor.com");
mail_message.To.Add(txtEmailAddress.Text);
mail_message.CC.Add("(e-mail address removed)");
mail_message.Priority = MailPriority.High;
mail_message.IsBodyHtml = true;
mail_message.Subject = "welcome to zatoor.com";
mail_message.Body = html_message;

smtp_client.Send(mail_message);
 
for your info, the same code is working fine for all emails excpt
hotmail.com

And what error(s) are you getting with HotMail? Are your emails getting
bounced? Might the be being caught in HotMail's spam filter? Has the
recipient accidentally added you to their Blocked Senders list?
 
I am getting nothing..It just send the email hutmail will never receive it.
However, when I send an email from hotmail to zatoor.com and then reply to
the email from zatoor.com i do receive it and I don't know why!!
 
plz help..


Mark Rae said:
And what error(s) are you getting with HotMail? Are your emails getting
bounced? Might the be being caught in HotMail's spam filter? Has the
recipient accidentally added you to their Blocked Senders list?
 
That's a well-known problem.

Many ISPs accept web mail from any source.
Hotmail isn't one of them.

You can *reply* to a Hotmail mail, but you cannot originate
mail to a Hotmail account using system.web nor system.net.

I think it has to do with their spam filter settings.

When system.web or system.net send mail, they use the machine's
name as the originator, and the sender is not authenticated.

Unless you are sending through a fully-qualified mail server name, which requires
authentication, those messages will get bounced and classified as SPAM by Hotmail.

Bottom line : don't use a simple smtp server.
Use a full-fledged POP3 mail server and authenticate the message sender.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
Jassim said:
for your info, the same code is working fine for all emails excpt hotmail.com

here is the code:
MailMessage mail_message = new MailMessage();
SmtpClient smtp_client = new SmtpClient("localhost");

string html_message = null;

html_message = "<html>";
html_message += "<head>";
html_message += "<meta http-equiv=Content-Type content='text/html; charset=windows-1252'>";
html_message += "</head>";
html_message += "<body>";
html_message += "Thank you for registering with zatoor.com and welcome to the world of free
classifieds. We hope you will enjoy using our website.";
html_message += "<br><br>";
html_message += "Please click on the following link to activate your account:";
html_message += "<br>";
html_message += "<a href='http://www.zatoor.com/activate.aspx'>CLICK HERE TO ACTIVATE YOUR
ACCOUNT</a>";
html_message += "<br><br>";
html_message += "zatoor.com Team";
html_message += "</body>";
html_message += "</html>";

mail_message.From = new MailAddress("(e-mail address removed)", "zatoor.com");
mail_message.To.Add(txtEmailAddress.Text);
mail_message.CC.Add("(e-mail address removed)");
mail_message.Priority = MailPriority.High;
mail_message.IsBodyHtml = true;
mail_message.Subject = "welcome to zatoor.com";
mail_message.Body = html_message;

smtp_client.Send(mail_message);
 
the problem is solved by using smtp.zatoor.com instead of localhost in the
SmtpClient but now I have one problem!! when I receive the message in
Windows Live Hotmail, I get (This message has been blocked for your safety)
message with it.

what can I do?



Juan T. Llibre said:
That's a well-known problem.

Many ISPs accept web mail from any source.
Hotmail isn't one of them.

You can *reply* to a Hotmail mail, but you cannot originate
mail to a Hotmail account using system.web nor system.net.

I think it has to do with their spam filter settings.

When system.web or system.net send mail, they use the machine's
name as the originator, and the sender is not authenticated.

Unless you are sending through a fully-qualified mail server name, which
requires
authentication, those messages will get bounced and classified as SPAM by
Hotmail.

Bottom line : don't use a simple smtp server.
Use a full-fledged POP3 mail server and authenticate the message sender.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top