- Code: Select all Expand view
- #include "FiveWin.ch"
function Main()
local oMsg := CreateObject( "CDO.Message" )
local oConf := CreateObject( "CDO.Configuration" )
local cSchema := "http://schemas.microsoft.com/cdo/configuration/"
oConf:Fields[ cSchema + "sendusing" ] = 2
oConf:Fields[ cSchema + "smtpserver" ] = "smtp.gmail.com"
oConf:Fields[ cSchema + "smtpserverport" ] = 465
oConf:Fields[ cSchema + "smtpauthenticate" ] = 1
oConf:Fields[ cSchema + "sendusername" ] = "alinares@fivetechsoft.com"
oConf:Fields[ cSchema + "sendpassword" ] = "yourpassword"
oConf:Fields[ cSchema + "smtpusessl" ] = 1
oConf:Fields:Update()
oMsg:To = "antonio.fivetech@gmail.com"
oMsg:From ="Antonio <alinares@fivetechsoft.com>"
oMsg:Subject = "Test send with gmail account"
oMsg:HTMLBody = "it works"
oMsg:Sender = "Antonio"
oMsg:Organization = "FiveTech"
oMsg:ReplyTo = "alinares@fivetechsoft.com"
oMsg:Configuration = oConf
oMsg:Send()
MsgInfo( "done" )
return nil