in reply to Re: Unable to send email using MIME::Lite
in thread Unable to send email using MIME::Lite
#!/usr/bin/perl #===================================================================== +========== # # FILE: ExampleMailer.pl # # USAGE: ./ExampleMailer.pl # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: S.SABARINATHAN (Sabarinathan), <sabarinathan@bksyste +ms.co.in> # COMPANY: Bk Systems (P) Ltd,Chennai # VERSION: 1.0 # CREATED: 04/28/10 12:52:40 IST # REVISION: --- #===================================================================== +========== use strict; use warnings; use MIME::Lite; use Net::SMTP; my $from = 'perlmail@bksys.co.in'; my $to = 'sabarinathan@bksys.co.in'; my $host = '192.168.1.1'; my $subject = 'A test message by script '; my $body = "Pls ignore this msg as this is test from perl scripts "; my $msg = MIME::Lite->new ( From => $from, To => $to, Subject => $subject, Type =>'multipart/mixed' ) or die "Error creating multipart container: $!\n"; $msg->attach ( Type => 'TEXT', Data => $body ) or die "Error adding the text message part: $!\n"; MIME::Lite->send('smtp', $host, Timeout=>60); $msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unable to send email using MIME::Lite
by sabari (Beadle) on Apr 28, 2010 at 09:35 UTC | |
by marto (Cardinal) on Apr 28, 2010 at 09:55 UTC | |
by sabari (Beadle) on Apr 29, 2010 at 04:35 UTC | |
by ikegami (Patriarch) on Apr 29, 2010 at 06:09 UTC | |
by sabari (Beadle) on Apr 29, 2010 at 11:22 UTC | |
by Anonymous Monk on Nov 23, 2012 at 15:47 UTC | |
by ytjPerl (Scribe) on Feb 28, 2018 at 20:21 UTC |