Guest User

Untitled

a guest
Dec 17th, 2017
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. using System.Net.Mail;
  8.  
  9. using System.Net;
  10. using System.Net.Mime;
  11. using System.Threading;
  12. using System.ComponentModel;
  13.  
  14. namespace TestHello
  15. {
  16.  
  17.  
  18. class Program
  19. {
  20. static void Main(string[] args)
  21. {
  22.  
  23. SmtpClient smtpClient = new SmtpClient();
  24. smtpClient.Host = "smtp.gmail.com";
  25. smtpClient.Port = 587;
  26. smtpClient.Credentials = new NetworkCredential("kamjobmail@gmail.com", "bartacocat11");
  27. smtpClient.EnableSsl = true;
  28.  
  29. MailMessage message = new MailMessage();
  30. message.To.Add("kamjobmail@gmail.com");
  31. message.Subject = "Password Manager Sync Account Created";
  32. message.From = new MailAddress("kamjobmail@gmail.com");
  33. message.Body = "My Email message";
  34. smtpClient.Send(message);
  35.  
  36.  
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment