Sending a report via SMTP using RB's Email Dialog
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
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
This discussion has been closed.
Comments
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Regards
Oliver
--- posted by geoForum on http://www.newswhat.com