Sample working send mail
Sample working send mail
Ciao all
I HAVE NO PROBLEM IF I USE THE BELOW SAMPLE USING PEC MAIL
BUT I GOT ERROR IF I WISH TO USE IT USING NO PEC MAIL, LIKE GMAIL (EXAMPLE)
PLEASE CAN U TELL ME WHAT IS WRONG ?
OR CAN U SEND ME A SMAL EXAMPLE TO SEND MAIL USING NO PEC (OR ALSO PEC)
GRAZIE !!!!
************************** SHORT EXAMPLE ************
function mail_dct(_from,_to,_password,_subject,_textbody,_arrattach,_smtpserver)
LOCAL oEmailMsg
LOCAL cSchema := "http://schemas.microsoft.com/cdo/configuration/"
LOCAL _lok:=.t.,_j,_cfile
b_oxon(10,"Inviando mail...")
oEmailMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT oEmailMsg
:From := alltrim(_from)
:To := alltrim(_to)
:CC := ""
:BCC := ""
:Subject := _subject
:TextBody := _textbody
:AddAttachment( ALLTRIM( "c:\test0.prg" ) )
WITH OBJECT :configuration:Fields
:Item( cSchema + "smtpserver" ):Value := alltrim(_smtpserver)
:Item( cSchema + "smtpserverport" ):Value := 465
:Item( cSchema + "sendusing" ):Value := 2
:Item( cSchema + "smtpauthenticate" ):Value := .T.
:Item( cSchema + "smtpusessl" ):Value := .T.
* only for pec mail :Item( cSchema + "sendtls" ):Value := .T.
:Item( cSchema + "sendtls" ):Value := .F.
:Item( cSchema + "sendusername" ):Value := alltrim(_from)
:Item( cSchema + "sendpassword" ):Value := alltrim(_password)
:Item( cSchema + "smtpconnectiontimeout"):Value := 30
:Update()
END WITH
:Send()
END WITH
RETURN nil
I HAVE NO PROBLEM IF I USE THE BELOW SAMPLE USING PEC MAIL
BUT I GOT ERROR IF I WISH TO USE IT USING NO PEC MAIL, LIKE GMAIL (EXAMPLE)
PLEASE CAN U TELL ME WHAT IS WRONG ?
OR CAN U SEND ME A SMAL EXAMPLE TO SEND MAIL USING NO PEC (OR ALSO PEC)
GRAZIE !!!!
************************** SHORT EXAMPLE ************
function mail_dct(_from,_to,_password,_subject,_textbody,_arrattach,_smtpserver)
LOCAL oEmailMsg
LOCAL cSchema := "http://schemas.microsoft.com/cdo/configuration/"
LOCAL _lok:=.t.,_j,_cfile
b_oxon(10,"Inviando mail...")
oEmailMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT oEmailMsg
:From := alltrim(_from)
:To := alltrim(_to)
:CC := ""
:BCC := ""
:Subject := _subject
:TextBody := _textbody
:AddAttachment( ALLTRIM( "c:\test0.prg" ) )
WITH OBJECT :configuration:Fields
:Item( cSchema + "smtpserver" ):Value := alltrim(_smtpserver)
:Item( cSchema + "smtpserverport" ):Value := 465
:Item( cSchema + "sendusing" ):Value := 2
:Item( cSchema + "smtpauthenticate" ):Value := .T.
:Item( cSchema + "smtpusessl" ):Value := .T.
* only for pec mail :Item( cSchema + "sendtls" ):Value := .T.
:Item( cSchema + "sendtls" ):Value := .F.
:Item( cSchema + "sendusername" ):Value := alltrim(_from)
:Item( cSchema + "sendpassword" ):Value := alltrim(_password)
:Item( cSchema + "smtpconnectiontimeout"):Value := 30
:Update()
END WITH
:Send()
END WITH
RETURN nil
Re: Sample working send mail
It is strange:
If i use my second mail on tiscali.it it works
Then smtp.tiscali.it works fine for my secondary mail
But smtp.gmailcom doesnt work for my primary mail
It seems that gmail has changed something
Any help on that ?
Grazie
If i use my second mail on tiscali.it it works
Then smtp.tiscali.it works fine for my secondary mail
But smtp.gmailcom doesnt work for my primary mail
It seems that gmail has changed something
Any help on that ?
Grazie
- karinha
- Posts: 7935
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Sample working send mail
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41597&sid=612e46e2bb7cb6d9588e468239515aab
Regards, saludos.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Sample working send mail
I tried it
It doenst work for gmail
Maybe because i have Harbout and not xHarbour ?
It doenst work for gmail
Maybe because i have Harbout and not xHarbour ?
- karinha
- Posts: 7935
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Sample working send mail
https://myaccount.google.com/lesssecureapps?pli=1&rapt=AEjHL4OVmY-ApGYbOoTh57mwGNggo1-hllqACXg8qD_BYdX3CYAn6MNk4CuR95yFG6zcVwUbGvcv3ni1RwKHy_uI_pyZuw5SWA
It will be increasingly difficult to use gmail.com. You don't have a paid account with another provider? The Fivewin version is irrelevant. Although the sooner you upgrade to a more modern version, the better.
Cada vez será más difícil usar gmail.com. ¿No tienes una cuenta paga con otro proveedor? La versión de Fivewin es irrelevante. Aunque cuanto antes actualices a una versión más moderna, mejor.
Regards, saludos.
It will be increasingly difficult to use gmail.com. You don't have a paid account with another provider? The Fivewin version is irrelevant. Although the sooner you upgrade to a more modern version, the better.
Cada vez será más difícil usar gmail.com. ¿No tienes una cuenta paga con otro proveedor? La versión de Fivewin es irrelevante. Aunque cuanto antes actualices a una versión más moderna, mejor.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Sample working send mail
hi,
i do not use GMail so i can not test it
in Express++ Forum "seems" have a Solution using "UNSAFE APPS" in Settings of the GMAIL account.
http://bb.donnay-software.com/donnay/phpbb3/viewtopic.php?f=15&t=2954&p=18050
but they talk about : this feature expires on 31 May 2022
it seems you have to make new "2-Step Verification" and uses the App Password instead of his GMail Account Password.
i do not use GMail so i can not test it
in Express++ Forum "seems" have a Solution using "UNSAFE APPS" in Settings of the GMAIL account.
http://bb.donnay-software.com/donnay/phpbb3/viewtopic.php?f=15&t=2954&p=18050
but they talk about : this feature expires on 31 May 2022
it seems you have to make new "2-Step Verification" and uses the App Password instead of his GMail Account Password.
greeting,
Jimmy
Jimmy
Re: Sample working send mail
it really seems doesnt exist a simple solution to continue use gmail mail by fwh
;-(
grazie anyhow
;-(
grazie anyhow
-
- Posts: 40
- Joined: Fri Aug 22, 2014 6:21 am
Re: Sample working send mail
One possibility is to install Thunderbird on the user's pc and activate a gmail account.
You send the e-mail as you always have, which is to gmail, and Thunderbird takes care of the rest.
https://support.mozilla.org/en-US/kb/th ... -and-gmail
You send the e-mail as you always have, which is to gmail, and Thunderbird takes care of the rest.
https://support.mozilla.org/en-US/kb/th ... -and-gmail
Re: Sample working send mail
Try this, hope may help.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41496&start=15&sid=8e4108ee48a646bc5fa151966287e43c
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41496&start=15&sid=8e4108ee48a646bc5fa151966287e43c
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Re: Sample working send mail
Hello,
I try this and it is working fine with GMAIL .
Try this, hope may help.
viewtopic.php?f=3&t=41496&start=15
Have a good day
Philippe
I try this and it is working fine with GMAIL .
Try this, hope may help.
viewtopic.php?f=3&t=41496&start=15
Have a good day
Philippe