Why not just use a standard SMTP module such as Mime::Lite
? Just configure it to use the Exchange IP address, for example (MIME::Lite code follows as I like it a lot :) ):
MIME::Lite->send('smtp', $exchange_server_name_or_ip_address, TimeOut=
my $msg=MIME::Lite->new (
That way you can easily change which server the mail goes out through and you don't restrict it to an IMAP only mail server. Plus Exchange has a very strange login sequence sometimes (I have to authenticate against mine in the format of 'firstname.lastname@example.org' or 'localdomain/forename.surname' dependent on how I'm accessing Exchange2000).
Otherwise you'll have to try Net::IMAP::Simple
but as I've never used either of those myself, I can't make any recommendations.