Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, im doing a registration form, and i ask the user to type his/her email, so after clicking on the button "register" it will send an email to the user. what i have is this :
VB
Dim smtpServer As New SmtpClient
        Dim mail As New MailMessage()
        smtpServer.Credentials = New Net.NetworkCredential("myemail@gmail.c­om", "pass")
        smtpServer.Port = 587
        smtpServer.Host = "smtp.gmail.com"
        smtpServer.EnableSsl = True
        mail = New MailMessage()
        mail.From = New MailAddress("myemail@gmail.com")
        mail.To.Add("users-email@gmail.com")
        mail.Subject = " Welcome"
        mail.Body = "hi"
        smtpServer.Send(mail)
Posted
Updated 21-Feb-15 8:40am
v2

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