Tranlating VB code into Perl to utilise Outlook Redemption

G

Graham

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?
 
G

Graham

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 "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send
 
M

Matt Garrish

Graham said:
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
 
G

Graham

Aah - that looks more familiar. Thanks Matt!


Matt Garrish said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top