我必须在表格提交上发送邮件,但它不能与我合作
// envoyer mail
SmtpClient client = new SmtpClient("host");
//User name and password goes here
MailMessage mailMessage = new MailMessage { From = new MailAddress("someone@somewhere.com") };
mailMessage.To.Add("someone@somewhere.com");
mailMessage.Subject = "Hello There";
mailMessage.Body = "Hello my friend!";
client.Host = "host";
client.Port = 25;
User name and password
client.EnableSsl = false;
client.Send(mailMessage);
谢谢