Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MailMessage mail = new MailMessage("from@gmail.com", "to@hotmail.com");
- SmtpClient client = new SmtpClient("smtp.gmail.com");
- client.Port = 587;
- client.Credentials = new System.Net.NetworkCredential("from@gmail.com", "pwd");
- client.UseDefaultCredentials = false;
- client.DeliveryMethod = SmtpDeliveryMethod.Network;
- client.EnableSsl = true;
- mail.Subject = "this is a test email.";
- mail.Body = "this is my test email body";
- client.Send(mail);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement