Wednesday, September 7, 2005

From the Edge: Understanding the Built-in E-Mail Capabilities of Report Designer
Section: Reports and Report Designer
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.5 and V-8 Turbo for Windows
Builds: R:BASE 7.5 (7.5.16.30907 or higher)
        R:BASE V-8 Turbo (8.0.12.30907 or higher)

Among major built-in tools, features and enhancements, R:BASE 7.5
for Windows and R:BASE V-8 Turbo for Windows also include the
capability of sending e-mail soon after the report is generated.
You can achieve this goal by giving end-user the option to manually
input required e-mail data via a dialog box or totally automate the
process using the addition OPTIONS for PRINT command.

First, follow the steps below to setup the user environment to
automate e-mail process:

01. Start RBG75 (Build: 7.5.16.30907) or RBG8 (Build: 8.0.12.30907)

02. Main Window|Settings|Repot/Label Designer|Report E-Mail Settings...
        
    Enter the required values for your SMTP Server and Security and
    then Click on the [Test] button to verify the valid communication
    with your SMTP server. This should provide you the response and
    confirmation message from your SMTP Server. (Figure 1)

03. Click on [OK] button to save Report E-Mail Settings

04. Repeat Step 01 - 03 on each workstation to take advantage of
    built-in E-Mail capabilities of Report Designer

    Note: There is no setup required if using the command line
    OPTIONS for PRINT command.
    Example to use the E-Mail settings when PRINTing the report:

    CONNECT RRBYW10
    Database Explorer | Reports | Invoice |
    Database Explorer | Reports | Run Report
    WHERE TransID = 1031
    File | Print to a File | Type: Adobe Acrobat Document |
    File Name: Invoice.PDF | Click on OK button
    Check the new option for [ ] E-Mail After Generate and then
    click on OK button

    Using the command line:

    CONNECT RRBYW10
    PRINT Invoice WHERE TransID = 1031 +
    OPTION PDF|FILENAME Invoice.PDF +
    |EMAIL ON
    RETURN

Automating the entire process using the EMAIL options:

To automate the entire process of sending printed reports via
e-mail as soon the report is generated, use the following syntax
when the EMAIL option of the PRINT command is set to ON.

E-Mail OPTIONS:

EMAIL <ON/OFF>
EMAIL_HOST <value>
EMAIL_USERID <value>
EMAIL_PASSWORD  <value>
EMAIL_ATTACHMENTS <value>
EMAIL_BODY <value>
EMAIL_DATE <value>
EMAIL_FROM_ADDRESS <value>
EMAIL_FROM_NAME <value>
EMAIL_TO_LIST <value>
EMAIL_REPLY <value>
EMAIL_SUBJECT <value>
EMAIL_CC_LIST <value>
EMAIL_BCC_LIST <value>
EMAIL_PORT <value>
EMAIL_AUTHENTICATION <On/OFF>
EMAIL_DELETE_AFTER_SEND <ON/OFF>
EMAIL_SHOW_DIALOG <ON/OFF>

Example:

CONNECT RRBYW10
PRINT Invoice WHERE TransID = 1031 +
OPTION PDF|FILENAME Invoice_1031.PDF +
|EMAIL ON +
|EMAIL_TO_LIST [EMAIL PROTECTED], [EMAIL PROTECTED] +
|EMAIL_FROM_NAME John D. Johnson  +
|EMAIL_FROM_ADDRESS [EMAIL PROTECTED] +
|EMAIL_SUBJECT Imagine The Possibilities! +
|EMAIL_BODY Attach is the invoice sent via R:BASE. Because we Can! +
|EMAIL_ATTACHMENTS C:\Letters\otherstuff.pdf#C:\Letters\morestuff.pdf +
|EMAIL_DELETE_AFTER_SEND ON +
|EMAIL_SHOW_DIALOG OFF +
RETURN

Look for more examples and applications at the 2005 R:BASE Developers'
Conference in October! http://www.rbase.com/conference

A PDF version of this article along with description of each OPTION is
also available at:

From The Edge: http://www.razzak.com/fte

Enjoy and make sure to have fun!

Very Best R:egards,

Razzak.

Reply via email to