1, first open the QQ mailbox in the POP3/SMTP service
2. Code
MailMessage mymail = new MailMessage (); Create a message instance object
Mymail.from = new MailAddress (""); sender, to the mail server verification information corresponding, can not be arbitrarily changed
MYMAIL.TO.ADD (New MailAddress ("")); Receiver
Mymail.subject = "C # send Email"; Message header
mymail.subjectencoding = Encoding.UTF8; Title Encoding
Mymail.body = "This is a test email!"; Message content
mymail.bodyencoding = Encoding.UTF8; Message content Encoding
Mymail.isbodyhtml = true; Whether the message content supports HTML
SmtpClient smtp = new SmtpClient (); To create an SMTP instance object
Smtp. Host = "smtp.qq.com"; Mail server SMTP
Smtp. Port = 25; Mail server port
Smtp. Credentials = new NetworkCredential ("sender's email account", "password"); Mail Server Authentication Information
Smtp. Send (MyMail); Send mail
C # send QQ Mail