How do use CDO? Do you have an example?
I use hb_sendMail() or win_MAPIsendMail() but there is also BLAT
integration (I don't use it).
BTW are you going to use it in Windows or you plan to use under Linux
too?
Regards,
Qatan
Hello,
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
Thanks for your sample.
Sure:
hb_SendMail( cSERVER , ;
nPORT , ;
cFROM , ;
cTO , ;
cCC, ;
cBCC, ;
cBODY , ;
cSUBJECT , ;
aFILES , ;
cUSER , ;
cPASSWORD , ;
cPOPSERVER , ;
nPRIORITY , ; // PRIORITY 1=HIGH
3=NORMAL 5=LOW
lREAD, ;
bTRACE, ;
lPOPAUTHENTICATION ) // May have more
parameters that I don't use
Example (from Contrib):
------8<------
/*
* $Id: gmail.prg 14688 2010-06-04 13:32:23Z vszakats $
*/
/*
* Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
* www - http://harbour-project.org
*/
#include "common.ch"
#include "simpleio.ch"
PROCEDURE Main( cFrom, cPassword, cTo )
DEFAULT cFrom TO "<myn...@gmail.com>"
DEFAULT cPassword TO "<mypassword>"
DEFAULT cTo TO "addr...@domain.com"
? 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
------>8------
----- Original Message -----
From: "L." <lucasde...@gmail.com>
To: "Harbour Users" <harbou...@googlegroups.com>
Sent: Thursday, January 19, 2012 17:28
Subject: [harbour-users] Re: best way to Send an Email from Harbour
Hello,
Thanks for helping me.
Do you have a hb_sendmail() sample please?.
Sometomes I got errors with cdo.
This is a working sample:
#include "FiveWin.ch"
*#include "CdoSys.ch"
*#include "FGet.ch"
#include "Fileio.ch"
#define WS_3DLOOK 4
#define CLR_HBROWN nRGB( 205, 192, 176 )
#define CLR_NBLUE nRGB( 142, 171, 194 )
*
STATIC oDlg, oFont, oFont2
STATIC cMailServer,; //:= PadR( "smtp.gmail.com",
60 ), ; // servidor de correo
cFrom ,; //:= PadR( "remi...@gmail.com",
60 ), ; // remitente
nPort ,; //:=
465, ; // puerto usado por el
servidor de correo
cUser ,; //:=
Space( 60 ), ; // nombre de usuario para
autenticaci�n
cPass //:=
Space( 30 ) // contrase�a para
autenticaci�n
STATIC nLine := 1
//--------------------------------------------------------------------------------------------------------------------//
*Function fEmail(cMailServer, cFrom, cnPort, cUser, cPass )
Function fEmail(cTo) // Recibe como par�metro el correo electr�nico
del cliente
oDlg:lHelpIcon := .F.
oDlg:cCaption := "Mensaje Electr�nco para - " // +cNombre
oGet5:Paste(KeyStroke) ) }
contrase�a", "Atenci�n" )
Qatan
> leer m�s �- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -
--
> Can you please show line 54 of your demo.prg?
> There is an incompatible type there.
It looks more like this error is generated by the oErr := ErrorNew()
call in line 210 (or thereabout) in client.prg. And if so, it is caused
by the requested protocol "smtps" not being supported. The code at the
beginning of the New() method of the tIPClient class before the line I
mentioned explains it.
If that is what happens, then what looks like an incompatible type in
the error message is just the result of what follows in line 211:
oErr:Args := { Self, oURL:cProto }
Regards,
Klas
Seems that you are right.
Thanks for helping.
Qatan
I recommend you to test it with real data.
f.e.: "<myn...@gmail.com>" should be swiched to your email address:
"kycasde...@gmail.com" (without "<" and ">" ) and so on.
I belive it will work.
Here I use hb_sendmail() compiled with MingW and BCC 5.51 without
problems.
Sorry but I do not have BCC 5.8.2 right now to test but theoretically it
does not make any difference in this case since BCC 5.51 works for the test.
Probably it is account comfit problems. Did you try with other
configurations or other accounts (f.e. not gmail)?
I hope it will help you.
Regards,
Qatan
Hello,
Thanks again!.
> leer m�s �
> Which is the best way to send an email from Harbour?.
I don't use it myself, but my understanding is that CURL is the best way
to send email from Harbour.
--
Alex
Yes, I tested it and works well to send html email.
Qatan
----- Original Message -----
From: "Bernard Mouille" <bernard...@wanadoo.fr>
To: "Harbour Users" <harbou...@googlegroups.com>
Sent: Sunday, January 22, 2012 08:09
Subject: [harbour-users] Re: best way to Send an Email from Harbour
>
I would like to test CURL on day because I also heard that is very good
but my little experience is that it is not that easy to set up.
I tried once and got stuck (I do not remember what was the problem) and
I didn't go ahead because I didn't have time but I want to try again and
hb_sendmail() was doing the job.
Qatan