Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Sending a report via SMTP using RB's Email Dialog

edited December 2012 in General
Hi



Is there a way to send a report via SMTP using RB's built in Email
Dialog ? I want users to have the email button next to the print button
on the print preview but need to send the mail using SMTP instead of MAPI.



Regards

Oliver



--- posted by geoForum on http://www.newswhat.com

Comments

  • edited December 2012
    Hi Oliver,

    Yes, by adding a direct-connection plugin to your uses clause, your app
    will use that instead of the default MAPI plugin.

    Steps...

    1. Add ppSMTPIndy10 to your uses clause.
    2. Set the EmailSettings.Enabled and EmailSettings.ShowEmailDialog
    properties to True.
    3. Assign the UserName, Password, and HostAddress properties if needed
    (these can also be set inside the email dialog).

    Now when you preview the report and select the email button, the RB
    email dialog will display and send the email via Indy SMTP.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2012
    ?Sorry just to add to this, I still need the option to send via MAPI
    depending on the system setup, so I almost need an onEmail Event that
    will determine which protocol to use on the email button click.



    --- posted by geoForum on http://www.newswhat.com
  • edited December 2012
    Hi Oliver,

    This is possible, however you would not want to do this from an OnEmail
    event. Setting up the email plugin to use should be done as an
    initialization step before printing a report. Registering a new email
    plugin each time an email is sent would be very inefficient.

    Take a look at demo 110 of the main reports demo for an example of how
    to manually register different email plugins in code.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2012
    ?Thanks Nico. I have come right.



    Regards

    Oliver



    --- posted by geoForum on http://www.newswhat.com
This discussion has been closed.