Clearing Attachments
Is there a way to clear report attachments using RAP?
I have a customer who wants a plain text email sent to another company, but
they do not want pdf attachments on the e-mail. I'm trying to figure out
how to build the body of the email text in RAP, but
Report.EmailSettings.Attachments.clear does not seem to compile for clearing
the automatic attachment.
Also, is there an easy way to have the report actually appear as the body of
the email? Right now I think that I will have to build it using
Report.EmailSettings.Body.Add(ComponentName.Value), but that will be
tedious.
ReportBuilder 10.09
Delphi 2007
I have a customer who wants a plain text email sent to another company, but
they do not want pdf attachments on the e-mail. I'm trying to figure out
how to build the body of the email text in RAP, but
Report.EmailSettings.Attachments.clear does not seem to compile for clearing
the automatic attachment.
Also, is there an easy way to have the report actually appear as the body of
the email? Right now I think that I will have to build it using
Report.EmailSettings.Body.Add(ComponentName.Value), but that will be
tedious.
ReportBuilder 10.09
Delphi 2007
This discussion has been closed.
Comments
The email feature in ReportBuilder is not designed to send email without at
least the report as an attachment and is also not designed to display the
report as the body of the message.
I can expose the EmailSettings.Attachments property to RAP however clearing
it will not remove the report from the attachments of a sent email, this
property simply controls extra attachments a user might want to send.
One option would be to create and use the SMTP plugins directly bypassing
the report's email logic. The steps would be as follows...
1. Create a SMTP plugin object and a TppEmailMessage object.
2. Export the report to text.
3. Assign the proper values to the EmailMessage including the report file as
the Body of the message.
4. Call SendMail(EmailMessage); from the plugin to send the email.
Another option would be to use an email client library such as Indy,
Synapse, etc. to manually send the emails.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
but at least now I know for sure what I need to do. :-)