sending mail using Gmail error
hi,
something is not working right - i am trying to send email using Gmail, with or without attachment it generates error: java.net.SocketTimeoutException
why? what is wrong with my code? is there any other way to do it?
another thing is that it takes very long time...
thanks,
this is my code:
Sub SMTP_MessageSent(Success As Boolean)
Dim s As String
Log(Success)
If Success Then
ToastMessageShow("Message sent successfully", True)
Else
ToastMessageShow("Error sending message", True)
s = LastException.Message
Log(s)
End If
End Sub
Sub SMTP_SendMail(sTO As String, sCC As String, sBCC As String, mSubj As String, mBody As String)
Dim Mailer As SMTP
Mailer.UseSSL = True
Mailer.Initialize("smtp.gmail.com", 465, SMTP_UserName, SMTP_Password, "SMTP")
Mailer.To.Add(sTO)
Mailer.CC.Add(sCC)
Mailer.BCC.Add(sBCC)
Mailer.Subject = mSubj
Mailer.Body = mBody
'Mailer.AddAttachment(fPath, fName)
Mailer.Send
End Sub