
August 8th, 2012, 05:41 AM
|
|
Contributing User
|
|
Join Date: Jul 2012
Posts: 64
Time spent in forums: 21 h 6 m 55 sec
Reputation Power: 1
|
|
|
Problem with sending email
hi guys, i used many different codes but no one worked for me. can anyone give me any idea how can i do it??
thanks
Code:
use Mail::Sendmail; sendmail
(
From => 'mail1.bskyb.com',
To => 'myemail@hotmail.com',
Subject => 'some subject',
Message => "body of the message",
);
Code:
use MIME::Lite;
my $msg = MIME::Lite->new
(
From => 'me@myhost.com',
To => 'you@yourhost.com',
Cc => 'some@other.com, some@more.com',
Subject => 'A message with 2 parts...',
Type => 'multipart/mixed',
);
$msg->attach(
Type => 'TEXT',
Data => "Here's the GIF file you wanted",
);
$msg->attach(
Type => 'image/gif',
Path => 'aaa000123.gif',
Filename => 'logo.gif', );
$msg->send;
Code:
#!/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} = '/path/to/templates';
my $msg = MIME::Lite::TT::HTML->new(
From => 'admin@example.com',
To => 'frank@example.com',
Subject => 'Your recent purchase',
TmplOptions => \%options,
TmplParams => \%params, );
$msg->send;
|