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

smtp.Host = SMTP;

is proper?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.