'Process_Globals:
Dim SMTP1 As SMTP
Dim server As String : server= "smtp.gmail.com"
Dim port As Int : port= 465
Dim emailname As String : emailname="yourGmailAdress"
Dim password As String : password="yourpassword"
Dim protocol As String : protocol="SMTP"
'create
SMTP1.Initialize(server, port, emailname, password, protocol)
SMTP1.UseSSL = True
' sub send:
SMTP1.To.Add (destEmailAdress)
SMTP1.Subject = "someSubject"
SMTP1.Body = "someText"
SMTP1.AddAttachment(File.DirDefaultExternal, "examle.txt")
SMTP1.Send