I use the following code
Code: Select all
function SendMail()
local oOutMail, cIP
WSAStartup()
oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.gmail.com",465) )
MsgInfo( cIP )
oOutMail:bConnecting = { ||nil }
oOutMail:bConnected = { ||nil }
oOutMail:bDone = { || MsgInfo( "Message sent successfully" ) }
oOutMail:SendMail( "hermanswilly@gmail.com",; // From
{ "hermanswilly@gmail.com" },; // To
"Test2",; // Msg Text
"Test 2",; // Subject
{ } ) // attached files
return nil
When I want to use gmail port 465 or port 587 it does not work.
Does someone have an idea.
Thanks
Willy