Click here to Skip to main content
15,900,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi !

I am new in ASP.NET .
How to sent mail in ASP.NET ?

Thanks .
Posted

have you search the same question using CP search. take a look there-CP Search[Send Mail in asp.net][^]. I got more than 600 result having same question with solutions.
 
Share this answer
 
check this out:

Easy SMTP Mail Using ASP.NET 2.0[^]

hope it helps :)
 
Share this answer
 
Below given function is use for send mail.
Private Sub mail()
        Const ToAddress As String = "//sender address"
        Dim mm As New System.Net.Mail.MailMessage(ToAddress, Email.Text)
        mm.Subject = "Registration"
        mm.IsBodyHtml = True
        mm.Body = "//Your message" 
        Dim smtp As New System.Net.Mail.SmtpClient()
        smtp.Send(mm)
    End Sub


Now you configure the smtp in web.config file:-
<system.net>
    <mailsettings>
      <smtp>
        <network host="mail.google.com//write your host name" port="//write your mail prort no" username="//write your mailaddress for sending mail" password="//write your mail password" />
      </smtp>
    </mailsettings>
  </system.net>
 
Share this answer
 
One of the most common requirements in ASP.NET or for any Applications. There are plenty of Example available if your search. You have to use System.Net.Mail for the same.
Try this[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900