GSendMail is a function which allows you to send mails from your Given G-Mail account.
It’s simple to use I’m tired to explain how to use it and if you don’t understand the code go learn the basics first.

Imports System.Net.Mail
Module mSendMail

Public Sub GSendMail(ByVal MyEmail As String, ByVal ToMail As String, ByVal TheSubject As String, ByVal MainText As String, ByVal Username As String, ByVal Password As String)
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress(MyEmail)
MyMailMessage.Subject = (TheSubject)
MyMailMessage.Body = (MainText)

Dim SMTPServer As New SmtpClient(“”)
SMTPServer.Port = 587
SMTPServer.Credentials = New System.Net.NetworkCredential(Username, Password)
SMTPServer.EnableSsl = True
End Sub

End Module


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s