HB_SENDMAIL from-parameter

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 1905
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 315 times
Been thanked: 74 times
Contact:

HB_SENDMAIL from-parameter

Post by serge_girard » Thu Oct 12, 2017 11:28 am

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

edk
Posts: 195
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 55 times
Been thanked: 123 times

Post by edk » Thu Oct 12, 2017 11:55 am

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: 1905
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 315 times
Been thanked: 74 times
Contact:

Post by serge_girard » Thu Oct 12, 2017 2:20 pm

Thanks Kryzstof, I'll try and see what happens!
Serge

User avatar
mol
Posts: 2875
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 135 times
Been thanked: 66 times
Contact:

Post by mol » Thu Oct 12, 2017 6:06 pm

Edk name is EDWARD :-)

User avatar
serge_girard
Posts: 1905
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 315 times
Been thanked: 74 times
Contact:

Post by serge_girard » Fri Oct 13, 2017 6:54 am

Oops ! Sorry Edward (and Kryzstof) !

Serge

Post Reply