I'm using NET::SMTP to send a mail with a zip attach to it ( MIME::Lite ).
The problem is that when i'm sending my mails it's going through the mail server as a guest, but now i need to put a username, password and name server if i want to send mails, but i can't find a way of doing it, could you help me ??
Exemple :
$msg = MIME::Lite->new(
From =>"Me",
To =>'Someone',
Subject =>'Zip Files',
Type =>'Application/zip',
Encoding =>'base64',
Path =>'Dummy.zip'
);
$str = $msg->as_string;
#$smtp = Net::SMTP->new("mailhost");
$smtp->mail($ENV{USERNAME});
$smtp->to(you@you.com);
$smtp->data();
$smtp->datasend($str);
$smtp->dataend();
$smtp->quit;
I hope i'm clear enough.