|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by saini_er in Perl Programming Language
i want to send email from perl script without using Sendmail.
How can i achieve that?
I tried using "MIME::Lite::TT::HTM"L module but it gives following message:
SMTP Failed to connect to mail server: Unknown error
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
|
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Lite::TT::HTML;
my %params;
$params{first_name} = 'Frank';
$params{last_name} = 'Wiles';
$params{amt_due} = '24.99';
my %options;
$options{INCLUDE_PATH} = './';
my $msg = MIME::Lite::TT::HTML->new(
From => 'jag@gmail.com',
To => 'jag@gmail.com',
Subject => 'Mail Test',
Template => {
text => 'test.txt.tt',
html => 'test.html.tt',
},
TmplOptions => \%options,
TmplParams => \%params,
);
MIME::Lite->send('smtp', "gmail.com", Timeout=>600);
$msg->send;
|
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625