473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3270

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.