Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (2)
Email sending source code
no vote
&Nbsp; try & nbsp; & nbsp; & nbsp; {& nbsp; & nbsp; / / the temporary mandatory code is GB2312 & nbsp; & nbsp; encoding encoding= Encoding.GetEncoding (936); & nbsp; & nbsp; mailmessage message = new mailmessage & nbsp; & nbsp; new MailAddress & quot;, & quot; 5 & quot;, encoding), / / the first parameter is the address of the sender, and the second parameter is the sender & nbsp; &Nbsp; new MailAddress (textbox1. Text)); / / recipient email & nbsp; & nbsp; Message.SubjectEncoding = encoding;   Message.Subject =Textbox2. Text; / / Title & nbsp; & nbsp; Message.BodyEncoding = encoding;   Message.Body =Textbox3. Text; / / subject & nbsp; & nbsp; smtpclient smtpclient = new smtpclient (& quot; SMTP. 163. Com & quot; ); / / mailbox server & nbsp; & nbsp; smtpClient.Credentials =New networkcredential & quot; your mailbox user name & quot;, & quot; your mailbox password & quot;); / / your mailbox user name and password & nbsp; & nbsp; smtpClient.Timeout = 999999;   smtpClient.Send (Message);    }   catch (Exception ex)     {   throw new
(独_舞)
2016-08-23
0
1
Email source code
no vote
try { Coding provisional compulsory as GB2312 Encoding encoding = Encoding.GetEncoding(936); MailMessage Message = new MailMessage( New MailAddress ("your mailbox", "5", encoding),//first is the sender's address, and the second parameter is the sender New MailAddress (TextBox1.Text));//the recipient's mailbox Message.SubjectEncoding = encoding; Message.Subject =TextBox2.Text;//title Message.BodyEncoding = encoding; Message.Body = TextBox3.Text; The main body SmtpClient smtpClient = new SmtpClient ("SMTP.163.com");//mail server SmtpClient.Credentials = new NetworkCredential ("your mailbox username", "your mailbox passwords");//email username and password smtpClient.Timeout = 999999; smtpClient.Send(Message); } catch (Exception ex) { throw new Exception(ex.Message); }
(独_舞)
2016-08-23
0
1
No more~