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

Sending emails with HTML attachments

edited October 2007 in General
I tried sending emails with a PDF attachment and it worked great, but
when I set the EmailSettings.ReportFormat:= to 'HTMLFile' or any other
format other than DPF, the email doesn't get sent. I get get no
responce at all when I call SendMail.

Is it possible to embed the report as HTML, so that it appears when the
recipient opens the email, rather than forcing them to open an
attachment?



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

Comments

  • edited October 2007
    Hi,

    For future reference, please use your real full name when posting to these
    newsgroups.


    All the built-in devices have been tested to work correctly with the email
    feature. In my quick testing with RB 10.07, setting the ReportFormat
    property to TextFile successfully exported the report to a text file and
    attached it to the email being sent. Which third party device are you using
    to export to HTML?

    It is not currently possible to embed the report as HTML in the email body.
    This is something we will consider researching and adding to a later release
    of ReportBuilder. Thanks for the feedback.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2007
    RB 10.07 Delphi 7

    I'm trying to add some functionality to allow a user to define the file type
    of the attachment. Looking at this previous mail I see that I need to set
    the ReportFormat property to the appropriate Device Type. My problem is
    where these Device names come from ? I'm using the Waler library and want to
    be able to let the user select any of these file types as the email
    attachment. Can someone tell me where I can get the correct names for these
    to pass to the ReportFormat property.

    Ian Munro.

  • edited November 2007
    Hi Ian,

    Take a look at the source of the file devices you wish to use. All file
    devices in ReportBuilder must override the DeviceName routine which defines
    the name to be used for that particular device.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.