472,985 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,985 software developers and data experts.

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 3237

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
6
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only...
6
by: chris | last post by:
My code <?php $name = "freddie"; $message.="Hi Joe,\n"; $message.="\t $name has Filled out the form on the Website,\n"; $message.="The information from the form is listed below:\n";...
1
by: vandanasridhar | last post by:
Hi, Vandana Writing. I saw a project on freelancer's Site. they want a project that accepts an email id and a contents and can able to send Email. Will anyone Guide Me how to crete a mail sender. I...
2
by: Mitul | last post by:
Hello Friend, I am having very strange problem with mail function. As I have to implement Newsletter things in my hebrew site. I have implemented everything but having problem with subject line...
1
by: mobs6 | last post by:
This error messages always shown up, after i filled the registration form Can some body tell me about this problems, ok this is error the message looks like: " sendmail: Can't send mail: Sender...
3
rsrinivasan
by: rsrinivasan | last post by:
Hi, When i run the below program to send mail, I hava an error msg like this. What is the problem? javax.mail.SendFailedException: Invalid Addresses; nested exception is: class...
0
by: Emmanuel Petit | last post by:
I apologise in advance for my little knowledges in php. I use PHP 5.2.1 Here is an extract of the script which causes me problems. //email of recipient $ea='mister@somesite.com'; //tracking...
1
by: =?Utf-8?B?VGltb3RoeQ==?= | last post by:
Hi all, who can help me , recently i found a problem from the window mail whic are i am using my own personal mail account and try to using window mail to log in. anywhre i can receive some of...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.