HB_SENDMAIL from-parameter

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

HB_SENDMAIL from-parameter

Post 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
There's nothing you can do that can't be done...
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HB_SENDMAIL from-parameter

Post 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.) )
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_SENDMAIL from-parameter

Post by serge_girard »

Thanks Kryzstof, I'll try and see what happens!
Serge
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_SENDMAIL from-parameter

Post by serge_girard »

Oops ! Sorry Edward (and Kryzstof) !

Serge
There's nothing you can do that can't be done...
Post Reply