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

New SMTPOutlook plug-in

Hi,

RB 21 newfeatures refers to this but I can find no documentation or sample on how to use it.

Thanks,

Ken

Comments

  • Hi Ken,

    The Outlook plug-in is not new, what's new is a TppSMTPOutlook.SetModal(aModal: Boolean) class function that be used to specify whether Outlook is displayed modal. The default is True.

    The Outlook plug-in can be used by adding ppSMTPOutlook to the 'uses' of your .pas unit. This plug-in uses Outlook COM interfaces to control Outlook. This has proven to be more reliable than MAPI.


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • I have just noticed that I only get the errors if Outlook is already open!
  • Hi Ken,

    Please do not post RB source code to this public forum. Instead send to support@

    This issue is likely be due to access rights differences between the host application and the email client. If for instance you are running Delphi in Administrator mode and have Outlook running in User mode, you will receive an error. To solve the problem, make be sure each application is running under the same security context.

    https://stackoverflow.com/questions/29338902/using-createoleobjectoutlook-application-causes-server-execution-failed-er


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Both are running without administrative rights.
  • Hi Ken,

    I tested all four combinations: Outlook with/without Admin privileges and RB app with/without Admin privileges. The two where privileges match work, the two where privileges differ, result in error.

    I recommend testing this outside of Delphi. Use File Explorer to browse to the compiled Delphi/RB .exe and run it from there.

    Also make sure Outlook is 32-bit when building Delphi/RB 32-bit app. If Outlook is 64-bit, need to build Delphi/RB 64-bit app.

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard,

    Thanks for your help. I can confirm that using ppSMTPOutlook works under these circumstances but reverting back to using ppSMTPMAPI, to be able to use multiple email clients, gives an error when Outlook.exe is running.

    Regards,

    Ken
  • Please ignore the above.
Sign In or Register to comment.