This my working method to send a email
Sub emailConfirm()
Dim email As String = txtMail.Text
Dim name As String = txtPrenom.Text + txtNom.Text
Dim mail As MailMessage = New MailMessage()
'mail.To.Add("francois.smtp@gmail.com")
mail.To.Add(email)
mail.From = New MailAddress("sumerman@gmail.com.com")
mail.Subject = "Email using Gmail"
Dim Body As String = "Hi " + name + ", this mail is to confirm your registration" + "Click on the link to confirm please" + " Link(check note) "
mail.Body = Body
mail.IsBodyHtml = True
Dim smtp As SmtpClient = New SmtpClient()
smtp.Host = "smtp.gmail.com"
smtp.Port = 587
smtp.Credentials = New System.Net.NetworkCredential("sumerman@gmail.com", "12345")
smtp.EnableSsl = True
smtp.Send(mail)
End Sub
note:I want to send Link contains a unique identifier and verify the unique identifier in the login.aspx
I don’t know when to do this…
I found nothing interesting on the net …
This is in Vb.net
I will add security later
Thank’s for your helping!
Well, first off don’t put the username and password in the email itself. That’s a bit sloppy.
Second, most sites now do the following:
Note that the email did NOT send the actual username/pw info.