468,514 Members | 1,250 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

Mail::Sender problem

Hi there,

I'm trying to create an html mail with embedded pictures in it. I run perl
on Windows and Red Hat but I cannot get your module (Mail::Sender) to work.
I'm just trying to run the examples. Below this message you'll find the perl
example I'm using and the header of the e-mail. What am I doing wrong?
Regards

Merijn Boom

Perl code:

use strict;

use Mail::Sender;

my $recipients = 'm*****@con-x-com.com';

eval {

(new Mail::Sender)

->OpenMultipart({

to => 'mailto',

FROM => 'mailfrom',

subject => 'Alternatives with images',

# debug => 'c:\temp\zkMailFlow.log',

multipart => 'related',

smtp => '127.0.0.1',

})

->Part({ctype => 'multipart/alternative'})

->Part({ ctype => 'text/plain', disposition
=> 'NONE', msg => 'A long mail message.'})

->Part({ctype => 'text/html', disposition =>
'NONE', msg => '<html><body><h1>A long</h1><p align=center>mail message.<img
src="cid:img1"></p></body></html>'})

->EndPart("multipart/alternative")

->Attach({

description => 'ed\'s GIF',

ctype => 'image/GIF',

encoding => 'base64',

disposition => "inline;
filename=\"apache_pb.gif\";\r\nContent-ID: <img1>",

file => 'apache_pb.gif'

})

->Close();

} or print "Error sending mail: $Mail::Sender::Error\n";

My Header:

To: *

From: *

Subject: Alternatives with images

Date: Sat, 21 Feb 2004 09:57:55 +0100

X-Mailer: Perl script "Perl-1.pl"

using Mail::Sender 0.8.10 by Jenda Krynicky, Czechlands

running on medusa (10.1.0.133)

under account "m.boom"

Message-ID: <20040221_085755_005175.*>

MIME-Version: 1.0

Content-type: multipart/related;

boundary="Message-Boundary-by-Mail-Sender-1077353872"

Return-Path: *
X-OriginalArrivalTime: 21 Feb 2004 08:58:38.0243 (UTC)
FILETIME=[E52FC730:01C3F858]

--Message-Boundary-by-Mail-Sender-1077353872

Content-Type: multipart/alternative;
boundary="Part-Message-Boundary-by-Mail-Sender-1077353872_2"

--Part-Message-Boundary-by-Mail-Sender-1077353872_2

Content-type: text/plain

Content-transfer-encoding: 7BIT

--Part-Message-Boundary-by-Mail-Sender-1077353872_2

Content-type: image/GIF; name="apache_pb.gif"

Content-description: ed's GIF

Content-transfer-encoding: base64

Content-disposition: inline; filename="apache_pb.gif";

Content-ID: <img1>

--Part-Message-Boundary-by-Mail-Sender-1077353872_2--

--Message-Boundary-by-Mail-Sender-1077353872-

My Message:

A long mail message.--Part-Message-Boundary-by-Mail-Sender-1077353872_2

Content-type: text/html

Content-transfer-encoding: 7BIT

<html><body><h1>A long</h1><p align=center>mail message.<img
src="cid:img1"></p></body></html>--Part-Message-Boundary-by-Mail-Sender-1077
353872_2--


Jul 19 '05 #1
0 3002

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bruce W...1 | last post: by
6 posts views Thread by Mike the Canadian | last post: by
6 posts views Thread by chris | last post: by
2 posts views Thread by Mitul | last post: by
rsrinivasan
3 posts views Thread by rsrinivasan | last post: by
reply views Thread by Emmanuel Petit | last post: by
1 post views Thread by =?Utf-8?B?VGltb3RoeQ==?= | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.