I want to send email via C#, how i can do this by the correct way? I should use
System.Net.Mail
MailMessage mail = new MailMessage();
And now?
I want to send email via C#, how i can do this by the correct way? I should use
System.Net.Mail
MailMessage mail = new MailMessage();
And now?
SmtpClient SmtpServer = new SmtpClient("mail.provider.com.br");
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
mail.Subject = "Some title";
mail.Body = "YOUR TEXT GOES HERE";
SmtpServer.Port = 'port';
//credentials
SmtpServer.Credentials = new System.Net.NetworkCredential("[email protected]", "pa$$word");
SmtpServer.Send(mail);