Carlos Reis wrote:
Hello Daniel
the routine of sending email is inserted into a much larger program.
so I quickly created a simple example that works on the old version HMG 3.0.35
but does not work in the new version HMG 3.0.46
Here I send the routine EnvEmail.prg:
HB_Sendmail Work
Code: Select all
/*
* $Id: gmail.prg 18434 2012-11-04 13:48:43Z vszakats $
*/
/*
* Copyright 2009 Viktor Szakats (harbour syenar.net)
* www - http://harbour-project.org
*/
#require "hbssl"
#require "hbtip"
REQUEST __HBEXTERN__HBSSL__
#include "simpleio.ch"
PROCEDURE Main( cFrom, cPassword, cTo )
IF ! tip_SSL()
? "Error: Requires SSL support"
RETURN
ENDIF
hb_default( @cFrom , "user@gmail.com" )
hb_default( @cPassword, "1234567890" )
hb_default( @cTo , "danielmaximiliano@yahoo.com.ar" )
? hb_SendMail( ;
"smtp.gmail.com", ;
465, ;
cFrom, ;
cTo, ;
NIL /* CC */, ;
{} /* BCC */, ;
"test: body", ;
"test: subject", ;
NIL /* attachment */, ;
cFrom, ;
cPassword, ;
"", ;
NIL /* nPriority */, ;
NIL /* lRead */, ;
.T. /* lTrace */, ;
.F., ;
NIL /* lNoAuth */, ;
NIL /* nTimeOut */, ;
NIL /* cReplyTo */, ;
.T. )
RETURN
Can you set the output port to 465 STMP if applicable, with that port so I can communicate with no port 25, you can also change the password '0123456789 '
Pop3.log
20121114-15:46:25 :INETCONNECT( origem, 123456789 )
>> <pointer> <<
20121114-15:46:25 :INETERRORCODE( <pointer> )
user : 'origem'
password : ' origem'
Example configuration SMTP

- Configuración de la cuenta_2012-11-14_15-51-15.jpg (69.29 KiB) Viewed 4731 times