Advertisement
Java_Volume1 Internet/ Browsers/ HTML #103088

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

AI Summary: 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.

Source Code
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)
Original Comments (3)
Recovered from Wayback Machine