Advertisement
2_2002-2004 Internet/ Browsers/ HTML #130238

How to send an email in ASP.net

Sending email in ASP.NET is a breeze! Check out this example. Note that docs say that the .SMTPServer property is optional...if you don't specify one, Windows queues up your email for you. However, I haven't tested out this method of sending mail.

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
Dim mmMail As New System.Web.Mail.MailMessage()
  Dim objSmtpServer As System.Web.Mail.SmtpMail
  mmMail.From = "me@me.com"
  mmMail.To = "you@you.com"
  mmMail.Subject = "My subject"
  mmMail.Body = "My body"
  objSmtpServer.SmtpServer = "my smtp server"
  objSmtpServer.Send(mmMail)
Commenti originali (3)
Recuperato da Wayback Machine