Posted on 2009-01-12 13:14:12-08 by arfreitas
Test::Reporter::Transport::Outlook

Greetings,

I'm a ActivePerl user and in my job I'm not able to connect externally to a SMTP server and authentication against an Exchange server is not that simple.

What is simple is to use Outlook to send the email message. I created a module to do that and looks like it works fine, althought I'm still not able to define customized headers (like the one that defines the tool used to report the test) because of limitations of Outlook (that looks like can be fixed by using a DLL called Redemption).

I would like to know if it would be interesting to publish this module and, if it is, how problematic would not sending the customized header.

The code is quite simple and follows below:

use strict; use warnings; package Test::Reporter::Transport::Outlook; use base 'Test::Reporter::Transport'; use vars qw/$VERSION/; use Mail::Outlook; $VERSION = '0.01'; $VERSION = eval $VERSION; sub new { my $class = shift; my $self = { _outlook => Mail::Outlook->new() }; return bless $self, $class; } sub get_outlook { my $self = shift; return $self->{_outlook}; } sub send { my ( $self, $report ) = @_; my $message = $self->get_outlook()->create(); $message->To( $report->address() ); $message->Subject( $report->subject() ); $message->Body( $report->report() ); $message->display(); return; } 1; __END__

Regards,

Alceu

Direct Responses: 9709 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.