SMTP client does not share _c# tutorial with multiple error solutions such as authentication

Source: Internet
Author: User
Tags error code imap stack trace mail time mailmessage server port smtpclient ssl connection

Recently in the mail to send the interface to the problems encountered and solutions to tell you want to know the message to help people

The original program part of the code is as follows

 Set mail message sender address, recipient address, title, subject
 MailMessage mail = new MailMessage ("xxxxxxx@sina.com", "zzzzzzz@sina.com", "title", "Subject");
 //Set mail subject format
 . bodyencoding = Encoding.UTF8;
 Sets whether the message body format is HTML format
 mail. isbodyhtml = false;

 Verify the mailbox username password
 networkcredential work = new NetworkCredential ("xxxxxxx", "pwd");
  Verify username password
 client. Credentials = work;

 Set mailbox SMTP Server port
 smtpclient client = new SmtpClient ("smtp.sina.com");
 
 Whether to request the client to be sent together
 . useDefaultCredentials = false;
 Set the message to send format
 client. Deliverymethod = smtpdeliverymethod.network;
 Secure connection set
 client. Enablessl = false;

 Client. Send (mail);

error One: Aserver error in the "/" application.

The SMTP server requires a secure connection or the client is not authenticated. Server response: 5.7.1 Client is not authenticated
Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.

Exception Details: The System.Net.Mail.SmtpException:SMTP server requires a secure connection or the client is not authenticated. Server response: 5.7.1 Client is not authenticated

Workaround:

 Set mailbox SMTP Server port
 smtpclient client = new SmtpClient ("smtp.sina.com", 587); 

Solution Description: I added the port number, 587 belong to send mail port generally this error will appear in your set of 163 recipient when QQ is no problem!

Error Two:a server error in the "/" application.

The server does not support secure connections.
Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.

Exception Details: System.Net.Mail.SmtpException: The server does not support secure connections. I set up client for the//secure connection. Enablessl = True; errors that occurred after

Workaround : method One is set to "client." Enablessl = False "or remove this line of code
Method two open secure connection service

Error Three: The SMTP server requires a secure connection or the client is not authenticated. The server response is: Authentication required
Stack trace: [The SMTPEXCEPTION:SMTP server requires a secure connection or the client is not authenticated. The server response is: Authentication Required]

Workaround:
Client. Enablessl = false; Change to client.  Enablessl = true; However, this may result in "error two" prompts, so to resolve
This, first of all, ensures that the server supports secure connections.

Error Four:
The SMTP server requires a secure connection or the client is not authenticated. The server response is: 5.7.0 must issue a STARTTLS command. 9sm5225813ywf.35

Workaround:Sina requires an SSL connection to change True

Universal Solution:
1, POP3 and SMTP server to fill in the correct
2, the server's port should be correct
3, my server requires identity authentication
4, send the message username and password to be correct

Set Mailbox SMTP server ports
SmtpClient client = new SmtpClient ("smtp.sina.com", 587); It's okay.
163 is the most stubborn! Need to pay attention to point QQ best! Oh

Sometimes the reason mail is backed down provides the following solutions:

First, foxmail send mail common error code:

Question: The server says:550 relaying mail to <> are not allowed
Question: The server says:550 <> ... relaying denied
Question: The server says:550 5.7.1 relaying not permitted:
Answer: When using certain SMTP servers, the recipient's address is restricted and only one SMTP server can be changed.

Question: The server says:550 <>:local user only
Question: The server says:550 <>:invalid User
Question: The server says:550 Invalid recipient
Answer: when using an SMTP server such as 163.net,163.com,yeah.net and netease.com, you can only send a letter in your own mailbox, so you want to use personal information in Outlook Express's account properties Fill in the correct email address inside.

Question: The server says:551 delivery not allowed to Non-local recipient
Question: The server says:553 Relay restriction.
Question: The server says:553 from <>, message blocked.
Question: The server says:553 sorry,you are not allow to use this SMTP to relay your Eami
Question: The server says:553 sorry, that domain Isn&apost in my list of allowed rcpthosts
Answer: When using the SMTP server for most mailboxes, such as 21cn.com,china.com,371.net,sina.com, you can only send a letter in your own mailbox, so you want to use personal information in Outlook Express's account properties Fill in the correct email address inside.

Question: The server says:505 client is not authenticated
Question: The server says:553 authentication is required to send mail as <>
Answer: use the 263.net and sohu.com SMTP server, not only to use their own mailbox letter, and to join authentication, so that is to "personal information" to fill in the correct e-mail address, but also select the "SMTP server needs authentication."

Question: The server says:535 Error:authenticatin failed
Question: The server says:535 authentication unsuccessful
Question: The server says:452 Insufficient system storage
Answer: in the process of using ESMTP authentication error, check the ESMTP settings, try more than a few times.

Question: The server says:553 <>...domain name required
Question: The server says:550 unable to relay for ...
Answer: More than now use the Wingate Proxy server to send mail. Although in Wingate "POP3 mailbox Account" to use "username #pop3 address" format, but in the "Account properties" in the "personal information" to fill in the general format.

Problem: The server says:553 mailbox name not allowed
Answer: the recipient's mailbox address is not allowed, need to check the recipient address is correct.

Question: The server says:553 sorry, your envelop sender is in my Badmailfrom list
Answer: the server restricts the recipient's address and can only send a message to another SMTP server.

Question: The server says:554 Transaction failed
Question: The server says:451 requested action aborted,errno=28
Answer: transmission failed, check network problem.

Question: The server says:503 error:needmail command
Question: The server says:503 need mail before RCPT.
Question: The server says:503 bad sequence of commands
Answer: message command order error, generally appear after other errors, first check the previous error prompts.

Question: The Server says:501 syntax.helo hostname
Question: The server says:501 Invalid domain name
Question: The server says:502 unimplemented command
Question: The server says:503 5.0.0 polite people say HELO
Question: The server says:533 relay restriction
Question: The server says:544 <>:recipient address Rejected:relay Access denied
Answer: syntax error in transmission, unexplained.

Ii. Common error codes for Outlook to send mail:

0x800c013e may be Folders.dbx file attribute error or corrupted.
0X800CCC00 Authentication (authentication) is not loaded
0X800CCC01 authentication (certificate) Content error
0X800CCC02 Authentication Date Error
0X800CCC03 the consumer is online
0X800CCC05 not online to server
0X800CCC0A Mail line download not completed
0X800CCC0B Server Busy
0X800CCC0D could not find the host (check your SMTP server is wrong, it may be the other side of the server problem, such as Mail server does not boot, the other side of the DNS server died, etc.)
0X800CCC0E online to the server failed and could not be brought online with the host. Perhaps the other host is in maintenance, or network online quality is not good, server shutdown, mail server has not started, etc., and so on, and so on, and so on.
0x800ccc0f Server End Online (the other server overload, network traffic congestion is easy to cause this phenomenon, you can try to increase your online time to wait for more than a try, or a better online quality of the ISP)
0X800CCC10 server cannot identify this email address
0X800CCC11 Server unrecognizable Mailing list
0X800CCC12 cannot teleport Winsock request
0X800CCC13 cannot receive Winsock reply
0x800ccc14 cannot start Winsock
0X800CCC15 cannot open Windows Socket
0X800CCC16 Unable to identify user account, user account error
0X800CCC17 User Interrupt operation
0X800CCC18 Login failed (for example: No Secure Password Authentication login is required, but secure Password Authentication login is provided)
0x800ccc19 Job Timeout
0X800CCC1A cannot build online with SSL

Winsock Error

0X800CCC40 Network subsystem not available
0x800ccc41 Windows Sockets does not support this application
0X800CCC43 bad address.
0X800CCC44 Windows Sockets Cannot load
0x800ccc45 Operation now in progress.

SMTP Error

0X800CCC60 an unlawful response.
0x800ccc61 An unknown error code
0X800CCC62 received a syntax error
0x800ccc63 syntax parameter is incorrect
0X800CCC64 instructions are incomplete
0x800ccc65 Incorrect sequence of instructions
0X800CCC66 instructions are incomplete
0x800ccc67 doesn't have this command.
0x800ccc68 mail box is locked or busy
0x800CCC69 can't find the mail box.
0X800CCC6A Processing Request Error
0X800CCC6B mail box is not on this server
0X800CCC6C has no space to store mail
0X800CCC6D has exceeded the restricted storage capacity?
0x800ccc6e illegal mail-box name
0x800ccc6f Transaction Error, appears this message, may be the server does not accept your mail, please contact your ISP.
0x800ccc78 unknown sender, or mail reply (reply-to) address is incorrect
0X800CCC79 recipient rejected by server
(Relay Denied: SMTP settings that most often occur in Outlook Express are incorrect, please send a letter using the SMTP server of the ISP company that provides your online service)
0X800CCC7A does not specify sender
0X800CCC7B does not specify the recipient

POP3 Error

0X800CCC90 Login mail server error, check to see if you have permission to use the server. Or: Do not need security password Authentication login, but set up a secure Password Authentication login
0X800CCC91 User name error or cannot find this consumer
0x800ccc92 account number, password error
0x800ccc93 cannot explain the response
0x800ccc94 need instructions.
There are no messages on the 0X800CCC95 server
0X800CCC96 no messages flagged for download
0X800CCC97 message ID out of range

NNTP Error

0X800CCCA0 news server is responding incorrectly, you may not have permission to use the server.
0X800CCCA1 failed to read news group
0X800CCCA2 requires server mailing list to fail
0X800CCCA3 cannot display manifest
0X800CCCA4 Unable to open group
0X800CCCA5 server does not have this group
0X800CCCA6 messages are not on the server
0x800ccca7 can't find the title of the item
0x800ccca8 can't find the message this article
0X800CCCA9 cannot be published to the server
0X800CCCAA cannot open the next message
0x800cccab Cannot display date
0X800CCCAC cannot display title
0x800cccad cannot display MIME headers
0X800CCCAE user name or password is incorrect

RAS Error
0X800CCCC2 dial-up Networking is not installed
0X800CCCC3 cannot find Dial-Up Networking
0X800CCCC4 dial-up Networking Error
0X800CCCC5 connectoid Bad or lost
0X800CCCC6 error when dialing settings are made

IMAP Error
0X800CCCD1 Login Failed
0X800CCCD2 message Tagged
0X800CCCD3 Invalid response to request.
0X800CCCD4 syntax error
0X800CCCD5 is not an IMAP server
0x800cccd6 Buffer has exceeded the upper limit
0x800cccd7 Recovery Error
0X800CCCD8 data is incomplete
0X800CCCD9 Online is rejected
0X800CCCDA unknown response.
0X800CCCDB User ID has changed
0X800CCCDC User ID directive failed
0X800CCCDD Unexpected Disconnect
0X800CCCDE Invalid Server State
0X800CCCDF cannot authenticate client

Third, the analysis of the letter back

Each set of mail systems has its own fixed letter of return format, in order to facilitate, we only listed several common letter of withdrawal, the first half of the letter is a fixed format, such as: Dear XX Mailbox Users: We are sorry to inform you that your email can not be delivered to one or more of the following address. The probable cause is ...
In fact, the real reason for the withdrawal of the letter in the second half of the "Server return information is:" In! Common to have:
1. Unknow User---does not have this users, many times, the customer writes the mail time, loses the opposite party's email address account number, causes this kind of question. (Of course there are individual special cases, such as some anti-spam organizations blocked the IP of the mailbox, the letter back will also show Unknow user, but rare)
2.not found host---not found. This situation is usually the other side of the domain name resolution has problems. If it is sent to 123@abc.com This mailbox, received such a letter of withdrawal, it is likely that DNS can not be abc.com this domain name resolution to the IP response!
3. Loops back to myself-domain is not active! Activation domain is a part of the open mailbox, if the letter to the mailbox that does not activate the domain will have such a retreat. However, this situation is rarely seen in relation to other common credit withdrawal situations.
4. I don ' t like Spam-ip was blocked by the other side. Need to explain that there are many "anti-spam organizations" in the world, these organizations are not the same as the assessment of garbage source, some organizations even all of China Telecom's IP blocked! In this case, we will contact the organization and request it to lift the ban on us. But the initiative is out of our area.
5.User quota has been reached---quota (space) is full.

This is the entire contents of this article, I hope that in the future when you encounter the SMTP server error, you can quickly resolve the problem.

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.