C # timed Send mailbox settings

Source: Internet
Author: User

Today temporarily maintained a former colleague to do the scheduled email demo.

The original is the use of NetEase 163 mailbox timed to send, but the mailbox will not receive mail.

Today, it was changed to QQ Mailbox, found that QQ mailbox is relatively stable, the basic no missing mail.

But in the process of change, there are some configuration problems, while the time to record.

1. Change the SMTP server first, this is needless to say. QQ Mailbox for Smtp.qq.com

2. Then use your QQ login mailbox, in the settings--account, open pop3/stmp settings (if your mailbox is just activated, you need to wait 14 days to use this feature)

3. Need to generate authorization code after opening, (QQ mailbox in the third party client, only support the use of account + authorization code, for security)

Specific settings visible: http://service.mail.qq.com/cgi-bin/help?subtype=1&&no=1001256&&id=28

4. NetEase was originally used without SSL encryption 25 port, to the QQ mailbox, it is not. 465/587 ports that must be encrypted with SSL

Basically it is set up so that you can use the instance send method of the SmtpClient class to send messages, using the MailAddress class and the MailMessage class to encapsulate the information to be sent.

Among the problems encountered:

(1) The Order of the commands is incorrect. The server responds as: Error:need EHLO and AUTH first!

Solution: To turn on the SMTP service, as shown in.

(2) The password here uses the authorization code.

(3) There is a syntax error in the parameter or variable. Server response: Mail From address must is same as authorization user

QQ mailbox need to use authorization code login, not the mailbox password.

Pending issues:

<1>: Do not know why use 465 port, always show operation timeout. The use of Port 587 will always be sent normally.

Does the great God know why?? Please advise.

<2> The current code is the time that the timer is used to match the profile once per second, and if the same, the code that sent the message is executed.

Feel a bit of trouble and then plan to use Quartz.net to perform timed tasks, which should be more appropriate.

C # Scheduled send mailbox settings

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.