Using system; using system. collections. generic; using system. LINQ; using system. net. mail; using system. text; using system. threading. tasks; namespace qqemail {class program {static void main (string [] ARGs) {for (INT I = 0; I <50; I ++) {mailmessage mymail = new mailmessage (); mymail. from = new system. net. mail. mailaddress ("email @ QQ.com"); mymail. to. add ("[email protected]"); mymail. subject = "C # automatically send mail test fro M haoliu to [email protected] "; mymail. Body =" Sorry, I'm testing the program. I just wrote the QQ number wrong, sorry! "; Mymail. isbodyhtml = true; smtpclient = new smtpclient (); smtpclient. deliverymethod = smtpdeliverymethod. network; smtpclient. host = "smtp.qq.com"; smtpclient. credentials = new system. net. networkcredential ("email @ QQ.com", "password"); try {smtpclient. send (mymail); console. writeline ("sent successfully");} catch (exception ex) {console. writeline ("failed to send email. check whether the email address is QQ and is not blocked by the protection software ");}}}}}