CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
sending mail

 



Demerzel
Novice

Aug 27, 2011, 5:05 AM

Post #1 of 2 (1271 views)
sending mail Can't Post

Hi, I had working script - reading and sending e-mail. Now i need only to send. So I took few lines out of my old script and I am stuck


Code
my $mail = build MIME::Entity Type=>"multipart/mixed"; 
$mail->head->add('To', $error_reciver);
$mail->head->add('From', $error_sender);
$mail->head->add('Reply-To', $error_sender);
$mail->head->add('Subject', 'something');
$mail->head->add('Message-ID', '1');
$mail->head->add('Return-path', $error_sender);
$mail->attach(
Type => 'text/plain',
Charset => 'UTF-8',
Encoding => 'quoted-printable',
Data => [ "ggggg \n" ],
);
$mail->smtpsend('MailFrom' => $error_sender, 'To' => $error_reciver, 'Return-path' => $error_sender) or die($mail->dump_skeleton(\*STDERR));

I get

Code
Content-type: multipart/mixed 
Effective-type: multipart/mixed
Body-file: NONE
Subject: something
Num-parts: 1
--
Content-type: text/plain
Effective-type: text/plain
Body-file: NONE
--
Died at ./contract-end.pl line 107.



davidbj
Novice

Aug 31, 2011, 5:39 AM

Post #2 of 2 (1169 views)
Re: [Demerzel] sending mail [In reply to] Can't Post

Died at line 107. What is that line?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives