Failure sending mail

Source: Internet
Author: User
Tags smtpclient

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.