Thanks Oma for the response. It turns out that variables treated, as in the example below, have, in my case, single quotes around them when the message is sent out. This is why I was unsuccessful in sending e-mails as |EMAIL_TO_LIST .v2 would have single quotes around the name and therefor not recognized by the mail server. Also explains the single quotes around a variable in the message. Also note that in the |EMAIL_ATTACHMENTS section, it appears that if only one attachment is to be sent, there is no need to define the file name here.

Razaak's response turned out to be the solution, but getting the text string correct was quite an exercise.




At 08:46 PM 1/16/2009, you wrote:
Steve,
SET VARIABLE VFILENAME = 'TEST.PDF'
SET VARIABLE V1 TEXT = ID1 IN TRANS WHERE INVNO = .VRESPONCE
SET VARIABLE V2 TEXT = EMAIL IN CUSTOMER WHERE ID1 =.V1
SET VARIABLE VRESPONCE = ('c:\EXPORT\'+.VFILENAME)

PRINT RENEW03 WHERE INVNO = .VRESPONCE +
   OPTION PDF|FILENAME .vresponce +
    |EMAIL ON +
    |EMAIL_HOST [email protected] +
    |EMAIL_USERID [email protected] +
    |EMAIL_PASSWORD xxxx+
    |EMAIL_TO_LIST  .v2 +
    |EMAIL_FROM_NAME example +
    |EMAIL_FROM_ADDRESS [email protected] +
    |EMAIL_SUBJECT test +
    |EMAIL_BODY (message and .RDATE1) +
    |EMAIL_ATTACHMENTS +
    |EMAIL_PORT 25 +
    |EMAIL_AUTHENTICATION ON +
    |EMAIL_DELETE_AFTER_SEND off +
    |EMAIL_SHOW_DIALOG OFF
RETURN

Best Regards,


Oma Cox
O.C. Services Inc.
P.O. Box 5485
Brandon, MS 39047

662.820.7599
601.992.6785

www.ocservicesinc.com

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steve
Johnson
Sent: Friday, January 16, 2009 6:46 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: E-mail 7.6

To All:

        I have been experimenting with the e-mail capability of Rbase 7.6
but have run into a few problems.  The biggest is whether one can
pass a variable to the |EMAIL_TO_LIST parameter (to pass an e-mail
address from the database). I placed a dotted variable in place of a
hardcoded name, defining the variable earlier that is captured when I
SHO VAR, but the e-mail process fails.  A hardcoded email address in
|EMAIL_TO_LIST does allow the e-mail process to be
successful.  However, in the received e-mail, curiously, there are
two attachments, rather than one as listed |EMAIL_ATTACHMENTS
C:\export\.vresponce.pdf. Also curious is that the .pdf extension
shown in the email is lower case in one and upper case in the
other.  I also have a variable (rdate1) in the message section that
is passed through successfully, but in the received e-mail, it has
single quotes around the printed variable. I suppose this may be
related to the set quotes command.
        So how do I pass a variable to the  |EMAIL_TO_LIST and why two
attachments rather than one.

R:Thanks
Steve



Reply via email to