Tranlating VB code into Perl to utilise Outlook Redemption

Discussion in 'Perl Misc' started by Graham, Mar 18, 2006.

  1. Graham

    Graham Guest

    Outlook Redemption is a COM object that works around the security issues of
    Outlook 2002+, and I wanna use this in a Perl script that works with Outlook
    in sending email. My problem is that I don't know VB well enough to
    translate the sample VB code for 'Send email bypassing the security prompt'
    at the following address
    http://www.dimastr.com/redemption/objects.htm#examples , into Perl.

    Can anyone help?
    Graham, Mar 18, 2006
    #1
    1. Advertising

  2. Graham

    Graham Guest

    Silly me..., the VB code in question is as follows:-

    dim SafeItem, oItem
    set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance
    of Redemption.SafeMailItem
    set oItem = Application.CreateItem(0) 'Create a new message
    SafeItem.Item = oItem 'set Item property
    SafeItem.Recipients.Add ""
    SafeItem.Recipients.ResolveAll
    SafeItem.Subject = "Testing Redemption"
    SafeItem.Send
    Graham, Mar 18, 2006
    #2
    1. Advertising

  3. Graham

    Matt Garrish Guest

    "Graham" <> wrote in message news:441c6009.0@entanet...
    > Outlook Redemption is a COM object that works around the security issues
    > of Outlook 2002+, and I wanna use this in a Perl script that works with
    > Outlook in sending email. My problem is that I don't know VB well enough
    > to translate the sample VB code for 'Send email bypassing the security
    > prompt' at the following address
    > http://www.dimastr.com/redemption/objects.htm#examples , into Perl.
    >
    > Can anyone help?


    This should get you started: (untested, of course, as I don't have
    Redemption)

    use Win32::OLE;

    my $Application = new Win32::OLE('Outlook.Application');

    my $oItem = $Application->CreateItem(0);

    my $SafeItem = new Win32::OLE('Redemption.SafeMailItem');

    $SafeItem->{'Item'} = $oItem;


    Translating the rest on your own shouldn't be too much to ask.

    Matt
    Matt Garrish, Mar 18, 2006
    #3
  4. Graham

    Graham Guest

    Aah - that looks more familiar. Thanks Matt!


    "Matt Garrish" <> wrote in message
    news:04_Sf.18038$...
    >
    > "Graham" <> wrote in message news:441c6009.0@entanet...
    >> Outlook Redemption is a COM object that works around the security issues
    >> of Outlook 2002+, and I wanna use this in a Perl script that works with
    >> Outlook in sending email. My problem is that I don't know VB well enough
    >> to translate the sample VB code for 'Send email bypassing the security
    >> prompt' at the following address
    >> http://www.dimastr.com/redemption/objects.htm#examples , into Perl.
    >>
    >> Can anyone help?

    >
    > This should get you started: (untested, of course, as I don't have
    > Redemption)
    >
    > use Win32::OLE;
    >
    > my $Application = new Win32::OLE('Outlook.Application');
    >
    > my $oItem = $Application->CreateItem(0);
    >
    > my $SafeItem = new Win32::OLE('Redemption.SafeMailItem');
    >
    > $SafeItem->{'Item'} = $oItem;
    >
    >
    > Translating the rest on your own shouldn't be too much to ask.
    >
    > Matt
    >
    Graham, Mar 18, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    2,470
  2. David Bear

    help tranlating perl expressions

    David Bear, Sep 28, 2006, in forum: Python
    Replies:
    4
    Views:
    327
    Dennis Lee Bieber
    Sep 28, 2006
  3. John Kotuby
    Replies:
    2
    Views:
    1,565
    John Kotuby
    Jan 28, 2008
  4. Brian Rankin

    Redemption, SafeMailItem and ActivePerl

    Brian Rankin, Sep 11, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    147
    Jay Tilton
    Sep 11, 2003
Loading...

Share This Page