Bcc - smtpmail.p

BenBundy

New Member
Sorry,

I het the message 3137 then
it does not accept ^B I think :(

Perhaps i have a different version of the free smtpmail.p ?

Hope to hear from you

Ben
 

PiluCar

New Member
Hi Ben,

I have smtpmail 5.8a.

Code:
/*-------------------------------------------------------------------
File........: smtpmail.p
Version.....: 5.8a - Aug 9, 2007
Description : Opens up an SMTP connection and sends an email message  
               to multiple recipients.
Input Param : 
     mailhub     char - settable SMTP server name/IP address
                 optionally append :XX where X is a port number of the
                 SMTP server.  25 is default port.
     EmailTo     CHAR - list of email addresses separated by 
                 semicolons or commas (All semicolons will 
                 be replaced by commas so don't include stuff 
                 like Smith, John)  <me@myaddress.org>"My Name"
     EmailFrom   CHAR - email address of user originating the email, 
                 the SMTP server should require that this user 
                 is real. Format looks like:
                 <user>@<host>[;<descriptive name>]
                 Example:
                 foo@bar.com[;Mr. Foo Bar]

                 If you want Delivery or Read Receipts, add a chr(1) delimiter
                 to the end of the EmailFrom and then one or two comma delimted
                 logical strings (Yes or No) for Delivery and Read Receipt
                 respectivley.
                 Example:
                 "foo@bar.com;Mr. Foo Bar" + chr(1) + "yes,no"                         
                 will give a delivery receipt and no read receipt.  These
                 PARAMETERs are strictly optional and not required.
                 Delivery and read receipts are always returned to the EmailFrom
                 address.

     EmailCC     CHAR - list of email addresses separated by 
                 semicolons or commas (All semicolons will 
                 be replaced by commas so don't include stuff
                 like Smith, John) <me@myaddress.org>"My Name"

                 [B]For BCC (blind copies) add a ^B to the end of the address.
                 Example: me@myaddress.org^B[/B]
I modified the code to add un PARAMETER.


Code:
...
DEF INPUT PARAMETER EmailTo         AS CHAR NO-UNDO.
DEF INPUT PARAMETER EmailFrom       AS CHAR NO-UNDO.
DEF INPUT PARAMETER EmailCC         AS CHAR NO-UNDO.
[B]DEF INPUT PARAMETER EmailBcc        AS CHAR NO-UNDO. [/B]
...
And just before to send the information to the server, I add my BCC email.

Code:
/********************** 5 (was 2) - Build From *****************/
      WHEN 5 THEN DO: /* 05/19/2003 LK replace 2 to 5*/
        {&logger2} vstate " " v " "  "Mail From" skip.
        
        
       [B] DO l_nbcc = 1 TO NUM-ENTRIES([/B][B]EmailBcc[/B][B]):
          ASSIGN EmailCC = EmailCC + (IF EmailCC = "" THEN "" ELSE ",") + ENTRY(l_nbcc,[/B][B]EmailBcc[/B][B]) + "^B".
        END.[/B]
If it doesn't work, send us the log file create by the smtpmail.
 

BenBundy

New Member
Pierre-Luc

I changed the 'socket' log because of errors of processes that holded this file in-use.
Can you perhaps send me your smtpmail version ?

Thanx

Ben
 
Top