plz send to me gmail email send vb6 source code -
plz send to me gmail email send vb6 source code
[email protected] send to me
Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click Dim sent As Integer = 0 Dim toSend As Integer = 1000 End Sub
Imports System.Net.Mail
Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click Dim sent As Integer = 0 Dim toSend As Integer = 1000 Do Until sent => toSend Try Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() SmtpServer.Credentials = New Net.NetworkCredential(emailFrom.Text, emailPass.Text) SmtpServer.EnableSsl = True SmtpServer.Port = 587 SmtpServer.Host = "smtp.gmail.com" mail = New MailMessage() mail.From = New MailAddress(emailFrom.Text) mail.To.Add(emailTo.Text) mail.Subject = subject.Text mail.Body = msg.Text SmtpServer.Send(mail) sent += 1 Catch ex As Exception MsgBox(ex.ToString) End Try Loop End Sub
Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click Dim trd As Threading.Thread trd = New Threading.Thread(AddressOf BulkMail) trd.isBackground = True trd.Start() End Sub Private Function BulkMail() Dim sent As Integer = 0 Dim toSend As Integer = 1000 Do Until sent => toSend Try Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() SmtpServer.Credentials = New Net.NetworkCredential(emailFrom.Text, emailPass.Text) SmtpServer.EnableSsl = True SmtpServer.Port = 587 SmtpServer.Host = "smtp.gmail.com" mail = New MailMessage() mail.From = New MailAddress(emailFrom.Text) mail.To.Add(emailTo.Text) mail.Subject = subject.Text mail.Body = msg.Text SmtpServer.Send(mail) sent += 1 Catch ex As Exception MsgBox(ex.ToString) End Try Loop End Function
Imports System.Net.Mail Public Class Form1 Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click Dim trd As Threading.Thread trd = New Threading.Thread(AddressOf BulkMail) trd.isBackground = True trd.Start() End Sub Private Function BulkMail() Dim sent As Integer = 0 Dim toSend As Integer = 1000 Do Until sent => toSend Try Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() SmtpServer.Credentials = New Net.NetworkCredential(emailFrom.Text, emailPass.Text) SmtpServer.EnableSsl = True SmtpServer.Port = 587 SmtpServer.Host = "smtp.gmail.com" mail = New MailMessage() mail.From = New MailAddress(emailFrom.Text) mail.To.Add(emailTo.Text) mail.Subject = subject.Text mail.Body = msg.Text SmtpServer.Send(mail) sent += 1 Catch ex As Exception MsgBox(ex.ToString) End Try Loop End Function End Class