Re: Mail Page in Asp.net ?
Sending email in asp.net is very simple and straight forward.
The first thing to do is to import the approriate namespace for using email
then create an instance of the MailMessage class from the above namespace
|Dim Msg as New MailMessage|
with this newly created message.. you can prepare your mail
Msg.To = "firstname.lastname@example.org"
Msg.From = "email@example.com"
'To CC this email
Msg.Cc = "firstname.lastname@example.org"
Msg.Bcc = "email@example.com"
'Now you decide the format and Send the email in format
Msg.BodyFormat = MailFormat.Html
'Set the priority - options are High, Low, and Normal
Msg.Priority = MailPriority.Normal
'Set the subject
Msg.Subject = "ASP.NET email"
'The body of the email
Msg.Body="This email has been sent from an asp.net page and is in html format!"
'now to send the email specify the smtp server
To send to a multiple of email addresses, write a function that will return a string with email addresses separated by commas after looping through a collection. this string can be used as input for Msg.To or Msg.CC or Msg.Bcc
BrainBench ADO.NET and ASP.NET Certified Developer