in reply to MIME::Lite does not pass PORT to Net::SMTP

UPDATE Never mind I saw the post about the latest MIME::Lite

I seem to remember talk about this recently, but it eludes me now. So I will mention using Net::SMTP_auth, which works with MIME::LITE. I know it's not exactly addressing the point of your post, but maybe the module author has a reason to keep auth and non-auth separate. ( Maybe because it works as it is? )

#!/usr/bin/perl use warnings; use strict; use MIME::Lite; use Net::SMTP_auth; my $Servername = "mail.foobar.com"; my $Port = 587; my $Username = "z+foobar.com"; my $Password = "foobar-secret"; my $Auth_type = 'LOGIN'; #PLAIN, LOGIN, CRAM-MD5# my $msg = MIME::Lite->new( From => 'z@foobar.com', TO => 'zentara@zentara.net', Subject => 'Testing Text Message with auth', Data => 'How\'s it going. Sent with Net-SMTP_auth' ); #my $msgbody = $msg->as_string(); #my $smtp = Net::SMTP_auth->new($Servername, Port=> $Port ); my $smtp = Net::SMTP_auth->new($Servername, Port=>$Port, Debug => 1 ); $smtp->auth( $Auth_type, $Username , $Password ); $smtp->mail('zentara@zentara.net'); $smtp->to('zentara@zentara.net'); $smtp -> data(); $smtp -> datasend( $msg->as_string() ); $smtp -> dataend(); $smtp -> quit;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: MIME::Lite does not pass PORT to Net::SMTP
by demerphq (Chancellor) on Aug 25, 2006 at 12:19 UTC

    but maybe the module author has a reason to keep auth and non-auth separate.

    Auth came later. The original had no support for it.

    ---
    $world=~s/war/peace/g