I made a mail sending module, and there was no problem in the local test, but the problem came when I published it to the server.
1. Send error: the email name is not allowed. Server Response: You are not authorized to send mail, authentication is required
Solution: SMTP. usedefaultcredentials = false; add this sentence.
2. If the email fails to be sent and the attempt is repeated, the event shown in the Event Viewer will be blocked by the port rule (The rule is in only warning mode) (Anti-Virus standard protection: prohibit group email worms from sending emails. "
This is causedBlockProgramSending emails, even web programs, will also block.
Solution:
The specific setting process is as follows:
1. Right-click the McAfee icon in the lower right corner of the system and select "virus scan console ".
2. In the pop-up interface, right-click "access protection" and choose "properties ".
3. Select the "prohibit group email worm from sending emails" option in "anti-virus standard protection" and click "edit ".
4. In the "excluded" process, configure the name of the project (the file name of the general cmd.exe file, where each process name is separated by a comma ).
5. Click "OK.
If our web program runs in Asp.net development server that comes with vs2005, the exception here is: webdev. webserver. EXE.
If it is in IIS 6, it is generally w3wp.exe. IIS 5 is usually aspnet_wp.exe
It seems that if the program related to the network goes wrong in the future, you can consider some common security software, such as anti-virus software and firewall, to ensure that the program is normal.
3. attachments cannot be sent.