Jump to content

Cann't send email ???


nobitavn94

Recommended Posts

In .NET 2003 ,I send an email as follow :try{ MailMessage Mess =new MailMessage(); Mess.To=Email; Mess.From=ADMIN_MAIL; Mess.Subject="Welcome to Auction System."; Mess.Body="Activate your account by clicking the link bellow"+"/r/n"; Mess.Body+="http://localhost/Auction/Activate.aspx?activatedcode="+code; SmtpMail.SmtpServer="127.0.0.1"; SmtpMail.Send(Mess);}catch(Exception ex){ Response.Write(.....);}It doesn't raise any exception ,but receiver doesn't receive the mail.I configured Mail Server (localhost) correctly .Help me !

Link to comment
Share on other sites

change this SmtpMail.SmtpServer="127.0.0.1"; to use your ISPs stmp service and see if that works. If it does then your server config is wrong. If is still doesn't work, your ISP may be blocking the SMTP port.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...