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

Silently Emailing a report PDF

edited February 2006 in General
I am close but not there yet.

I have a small app that E-mails out a status report in an Excel Workwork
every morning, 7:00 AM sharp. The process is fully automated using Windows
Scheduler. It has been running since 2002 without issue.

With the latest version of Report Builder and its Email feature, I wish to
redo this since I can add much more flare in a true Report.

I have the program working manually where the PDF is sent out from my
modifies previewer but now I was it to happen without printing or
pre-viewing. How can I do this?

Thanks

Comments

  • edited February 2006
    Hi Larry,

    You can automatically send a report using the new routine
    TppReport.SendMail. If you are interested in sending more than one report
    at the same time, take a look at the TppEmail object in the RBuilder help.
    It looks like for some reason the SendMail routine was not added into the RB
    10 help. I will add this to the documentation for the next maintainence
    release.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2006
    Thanks alot Nico,
    Do you know of any way to suppress the MS Office Outlook warning
    "A program is tryiong to automatically send e-mail on you behalf. ........"
    ?

    I guess I can shop for another client but Outlook is the client my customers
    use.
    Larry

  • edited February 2006
    Hi Larry,

    Microsoft added this security feature for the latest service packs and
    versions of Outlook. The main reason was to avoid the bad press of viruses
    being spread using their email software. Although the feature may succede
    in this task, it seems very restrictive. It would have been a lot nicer if
    they gave the user the option to define a list of "trusted" applications
    that can access the program without the warning message.

    One option is to use another MAPI enabled email suite. (Most major email
    applications include MAPI support). Another is to use the Indy plugin which
    accesses your email server directly without any security interference. Your
    users will be required to enter their server, username, and password
    initially before mail can be sent.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2006


    Can you provide and example of using the Indy client plugin?

    I will be setting up the customers machine and have access to all the above.

    Thanks
    Larry
  • edited February 2006
    Hi Larry,

    There is an example of using the Indy plugin located in demo 110 of the main
    reports demo (\RBuilder\Demos\1. Reports\). You should however be able to
    switch to the Indy plugin and still use the same code you already have.
    Simply add ppSMTPIndy to your uses clause and define the
    EmailSettings.HostAddress, EmailSettings.UserName, and
    EmailSettings.Password corresponding to your email server. The rest will be
    taken care of automatically.

    Note: If you are using RB 10 for Delphi 2005 or Delphi 2006, you will need
    to add either ppSMTPIndy9 or ppSMTPIndy10 to your uses clause depending on
    which version you installed when installing Delphi.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2006
    Thanks Nico,
    Should go pretty smoothe now.
    Larry
This discussion has been closed.