[Israel.pm] Sending mail using MIME::Lite and SMTP server parameter
Webmaster @ SOI
webmaster at secured.org.il
Thu Aug 19 12:09:25 PDT 2004
I'm kind of newbie to Perl and trying to use the MIME::Lite library
In order to send mail from Perl under RH9 Linux.
The thing is that I need to specify an SMTP server
As I understood from the MIME::Lite and Net::SMTP man
I can pass the SMTP server parameter to the new() function.
What I don't understand is how to combining them ...
The Net::SMTP says :
And the MIME::Lite says :
Instance method. Send message via SMTP, using Net::SMTP. The optional
ARGS are sent into Net::SMTP::new(): usually, these are
MAILHOST, OPTION=>VALUE, ...
Does anyone knows how can I combine the to so I can send a mail using
MIME::Lite with SMTP parameters ?
Below the base script I use :
Thanks for any help
### Create the multipart "container":
$msg = MIME::Lite->new(
From =>'user at mydomain.com',
To =>'user at rcvdomain.com',
Subject =>'A message with 2 parts...',
### Add the text message part:
### (Note that "attach" has same arguments as "new"):
Data =>"Here's the GIF file you wanted"
### Add the image part:
Disposition => 'attachment'
More information about the Perl