Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SMTP Example please

266 views
Skip to first unread message

Rick Lipkin

unread,
Jun 4, 2012, 8:54:19 AM6/4/12
to
To All

I know this topic has been discussed at one time or another .. if anyone has a simple SMTP ( with html body possibilities and attachment ) example they can share with me using native xHarbour libs, I would be most grateful.

Rick Lipkin

Patrick Mast

unread,
Jun 4, 2012, 12:27:38 PM6/4/12
to
Hey Rick,

> I know this topic has been discussed at one time or another .. if anyone has a simple SMTP ( with html body possibilities and attachment ) example they can share with me using native xHarbour libs, I would be most grateful.

Look at c:\xHarbour\contrib\tipssl\test.prg

Patrick

Rick Lipkin

unread,
Jun 4, 2012, 4:25:33 PM6/4/12
to
Patrick

Thank you for your quick reply .. I just downloaded the Contribs and looked at test.prg .. I saw 4 lines with Hb_SendMail() with various parameters..

HB_SendMail( 'smtp.mail.yahoo.com.br', 465, 'xxxxxx...@yahoo.com.br', {'xxxxxx...@yahoo.com.br','zzzzz...@xharbour.com.br'}, , ,'yahoo555'+hb_osnewline()+ 'cBodydfdsfdsfdsf'+hb_osnewline()+'erwerewrewr'+hb_osnewline()+'erewrewrew' , 'dsfdfdafdasfcSubject',{'sendmail.zip'} , 'xxxxxx...@yahoo.com.br','xxxxxxxxxxxxx', 'pop.mail.yahoo.com.br:995', , , .t., .t., , , , .t. ,, "v:\openssl\bin\aa")

Would you mind elaborating or point me in the right direction to de-code the parameters?

I am not looking for pop or imap .. just plain SMTP.

Thanks
Rick Lipkin

Klas Engwall

unread,
Jun 4, 2012, 8:57:44 PM6/4/12
to
Hi Rick,
HB_SendMail() exists in sendmail.prg in the same directory, and the
parameters are documented in the source.

Regards,
Klas

Rick Lipkin

unread,
Jun 5, 2012, 8:53:58 AM6/5/12
to
Klas

Thank you ..

Rick Lipkin

unread,
Jun 7, 2012, 9:24:43 AM6/7/12
to
To All

I have reviewed HB_SendMail() and have a few questions ..

1) I am looking for to send mail via SMTP with SSL .. ( no pop3 or imap requirements)

cServer -> Required. IP or domain name of the mail server
nPort -> Optional. Port used my email server
cFrom -> Required. Email address of the sender
aTo -> Required. Character string or array of email addresses to send the email to
aCC -> Optional. Character string or array of email adresses for CC (Carbon Copy)
aBCC -> Optional. Character string or array of email adresses for BCC (Blind Carbon Copy)
cBody -> Optional. The body message of the email as text, or the filename of the HTML message to send.
cSubject -> Optional. Subject of the sending email
aFiles -> Optional. Array of attachments to the email to send
cUser -> Required. User name for the POP3 server
cPass -> Required. Password for cUser
cPopServer -> Required. Pop3 server name or address
nPriority -> Optional. Email priority: 1=High, 3=Normal (Standard), 5=Low
lRead -> Optional. If set to .T., a confirmation request is send. Standard setting is .F.
lTrace -> Optional. If set to .T., a log file is created (sendmail<nNr>.log). Standard setting is .F.
lNoAuth -> Optional. Disable Autentication methods
nTimeOut -> Optional. Number os ms to wait default 20000 (20s)
cReplyTo -> Optional.

The above parameters require POP3 credentials .. not quite what I am looking for... and SSL ???

Am I just missing something here ??

Thanks
Rick Lipkin



cul...@gmail.com

unread,
Jun 10, 2012, 8:51:50 AM6/10/12
to
For SSL ( gmail server) you need to kink the tipssl library as first
one

is the same parameters with adition to 3 more
FUNCTION HB_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody,
cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, lTrace,
lPopAuth, lNoAuth, nTimeOut, cReplyTo, lSSL, CaFile, CAPath )

lSSl -> tell to use ssl
cafile cacert.pem
capath where the openssl certificate are

Regards
Luiz

Man-wai Chang

unread,
Jun 11, 2012, 7:29:36 AM6/11/12
to
> I know this topic has been discussed at one time or another .. if anyone has a simple SMTP ( with html body possibilities and attachment ) example they can share with me using native xHarbour libs, I would be most grateful.

Check out a tool called BLAT

--
@~@ Remain silent. Nothing from soldiers and magicians is real!
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (Fedora 15 i686) Linux 3.4.2
^ ^ 19:29:02 up 19:42 0 users load average: 0.29 0.37 0.28
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa


0 new messages