Recently, I was working on the Asp.net mail sending function and found a problem: In the vs environment, emails can be sent to the recipient's mailbox. Once deployed on the server, the following message is displayed: failure sending mail error.
After searching for the Internet, the solution is as follows:
1: the SMTP service must be installed on the server in IIS.
2: modify the code smtpclient client = new smtpclient ("localhost ");
Local Environment: vs2008 + WINXP
Remote Server: win2003 traditional Chinese
After testing the modification, we found that the email address of 163 can be sent, but it cannot be sent using Gmail! Gmail uses port 587, which is generally port 25.
I don't know why. I hope you can answer this question.
Reference: http://www.programmersheaven.com/mb/csharp/366962/366963/re-failure-sending-mail/
Http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/84e4d5a2-5919-4d6b-85cd-6b9f9d49b7e8