0

Hi all

sorry for my bad english

I have a vps and runnig windows 2003 server , i configured pop3 and install smtp
everything works fine when i send email by outlook (send / recive)

but nothing happend when i use this code on asp.net :

MailMessage mailMsg = new MailMessage();

            mailMsg.From = new MailAddress(FromAddress);
            mailMsg.To.Add(new MailAddress(ToAddress));
            mailMsg.Subject = Subject;
            mailMsg.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");
            mailMsg.Priority = MailPriority.High;
            mailMsg.Body = BodyText;
            mailMsg.IsBodyHtml = true;


            // Smtp configuration
            SmtpClient smtp = new SmtpClient();
            smtp.Host = SMTP;
            smtp.Credentials = new System.Net.NetworkCredential(UserName, Password);
            smtp.EnableSsl = false;

            smtp.Send(mailMsg);

also this code works fine when i use google smtp server (with ssl , for mine ssl = false)

so any idea about this?

more info about server:
rras enable , Nat/basic filewall enable
and no 3rd party firewall

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by milad_trip
0

The code works with google smtp not with mine
My smtp works with outlook but not with my aso code!

i couln't find any log on server

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.