Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How do I send email from C# without revealing my password?
- MailMessage mail = new MailMessage();
- SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
- mail.From = new MailAddress("Contact@pandorafreed.com");
- mail.To.Add("myemail@gmail.com");
- mail.Subject = "Pandora Free-D Message";
- mail.Body = "Name: " + C.NameBox.Text + "n" + "Email: " + C.emailBox.Text + "n" + C.Message.Text;
- SmtpServer.Port = 587;
- SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
- SmtpServer.EnableSsl = true;
- SmtpServer.Send(mail);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement