Dim mail As New System.Net.Mail.MailMessage Dim smtp As New System.Net.Mail.SmtpClient With mail .Body = Textbox1.Text + " " + Textbox2.Text .From = New System.Net.Mail.MailAddress("---email de l'expéditeur---") .To.Add(New System.Net.Mail.MailAddress("--- ton email en hotmail---")) .IsBodyHtml = True End With smtp.EnableSsl = True smtp.Credentials = New System.Net.NetworkCredential("---ton login---", "---ton password---") smtp.Host = "smtp.live.com" smtp.EnableSsl = True smtp.Port = 587 smtp.Send(mail)
<system.net> <mailSettings> <smtp> <network host="smtp.live.com"/> </smtp> </mailSettings> </system.net>