nobitavn94 Posted November 22, 2006 Share Posted November 22, 2006 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 More sharing options...
aspnetguy Posted November 22, 2006 Share Posted November 22, 2006 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 More sharing options...
nobitavn94 Posted November 23, 2006 Author Share Posted November 23, 2006 Thanks for your response.I sent mail to my mail box.Actually,mail was sent.After 30 minutes it come to mail box,so I think that my program doesn't work. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 28, 2006 Share Posted November 28, 2006 Try using \n to separate lines in the body instead of \r\n. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now