Page 1 of 1

HB_SENDMAIL from-parameter

Posted: Thu Oct 12, 2017 11:28 am
by serge_girard
Hello,


I use daily HB_SENDMAIL() in order to inform people.

There are persons, that are emailed, that receicve my email as following:

From: myname@ [mailto:myhost.be myname@.myhost.be]
Send: ...
To: someone@...
Subject: something

I set from-parameter in HB_SENDMAIL to: cFROM := 'myname@myhost.be'

So SOMETIMES display-address and from-address aren't correct?

Apparantly this SHOULD BE: From: myname@myhost.be [mailto:myhost.be myname@.myhost.be]
Now is my question how can I change this and what is correct (or not)?

Thanks for helping, Serge

Re: HB_SENDMAIL from-parameter

Posted: Thu Oct 12, 2017 11:55 am
by edk
Serge, maybe try to set:
cFrom := "Serge <myname@myhost.be>"
where:
Serge is a friendly account name;
<myname@myhost.be> to the e-mail address to reply.

Or
cFrom := "Serge"
cReplyTo:="myname@myhost.be"

Where: cReplyTo is the nineteenth parameter of hb_sendmail()

Code: Select all

hb_SendMail( ;
      cServer, ;                           
      Val( cPort ), ;                      
      cFrom, ;                             
      cTo, ;                               
      cCCTo /* CC */, ;                    
      {} /* BCC */, ;                      
      Trim( sysdata->emmsg ), ; 
      cSubject, ;                          
      {cFile} /* NIL attachment */, ;      
      cFrom, ;                             
      cPassword, ;                         
      "", ;                                
      NIL /* nPriority */, ;               
      .F. /* lRead */, ;                   
      .F. /* lTrace */, ;                 
      NIL /* lPopAuth */, ;                
      NIL /* lNoAuth */, ;                 
      NIL /* nTimeOut */, ;                
      NIL /* cReplyTo */, ;                
      iif(cPort=="465",.T.,.F.) )

Re: HB_SENDMAIL from-parameter

Posted: Thu Oct 12, 2017 2:20 pm
by serge_girard
Thanks Kryzstof, I'll try and see what happens!
Serge

Re: HB_SENDMAIL from-parameter

Posted: Thu Oct 12, 2017 6:06 pm
by mol
Edk name is EDWARD :-)

Re: HB_SENDMAIL from-parameter

Posted: Fri Oct 13, 2017 6:54 am
by serge_girard
Oops ! Sorry Edward (and Kryzstof) !

Serge