I need this.
I have a lan with 4 pc, I'd like to send from my app.exe a email when user insert a new product.
users have their email but with different extensions (usr1@gmail.com, usr2@mydominio.it, usr3@tiscali.it, etc)
I configured inside my.prg CDO.Message with gmail smtp
- Code: Select all Expand view
- WITH OBJECT oEmailCfg:Fields
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value := Alltrim(cServer) // "smtp.gmail.com"
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value := nPOrta // 465
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2 // Remote SMTP = 2, local = 1
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value := .t.
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value := lSSL
:Item( "http://schemas.microsoft.com/cdo/configuration/savesentitems" ):Value := lSave
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := AllTrim(cSender) // "usr1@gmail.com"
:Item( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := AllTrim(cPass) // Password of usr1
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"):Value := 60
:Update()
END WITH
when I used this settings from pc of user with usr1@gmail.com (in this pc there is Thunderbird) email work perfect but if I use my app.exe from pc of user with usr2@mydominio.it I get error.
I know that it's chained with thunderbird configuration but I'd like unchained email from smtp client.
I'd like to send email from all pc using always a general settings.
is it possible?