Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mime::lite adding spaces

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
0
0
GB
I have a Perl script which sends emails using mime::lite.

$EmailContent is created in a home grown text editor and the added as a var to the body in the script below.

Code:
my $msg = MIME::Lite->new(
From =>'email@domain.co.uk',
To =>	$results1[0],
Subject =>'NewsLetter',
Type =>'multipart/related',
Date => '0'
);
$msg->attach(
Type => 'text/html',
Data => qq{
	<body>
	$EmailContent
	</body>
   	},
);
$msg->send();

All has been working fine but I get a strange problem when I put in a link to a .pdf file.

Adding the line:-
Code:
Click <a href='[URL unfurl="true"]http://www.domain.co.uk/graha.pdf'>here</a>[/URL] to see a short video about it.
creates a proper link in Outlook Express but the link appears as
Code:
[URL unfurl="true"]http://www.domain.co.uk/grah!%20a.pdf[/URL]
in Windows mail.

Can anyone suggest a cure?

Keith
 
Turn on the debug and it would probably show what went wrong, such as "text of length limited to 1000 octets" or something else.
[tt] $msg->send([blue]Debug=>1[/blue]);[/tt]
 
The debug code gives me the following error and the email is not sent.

Code:
Status: 500 Content-type: text/html 
Software error:
Can't locate object method "send_by_Debug" via package "MIME::Lite" at /usr/lib/perl5/site_perl/5.8.0/MIME/Lite.pm line 2451.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top