phpbar.de logo

Mailinglisten-Archive

[php] e-mail as HTML

[php] e-mail as HTML

Adam Tuszynski php_(at)_phpcenter.de
Tue, 20 Mar 2001 10:51:43 +0100


Hallo,

Can anyone suggest why this script doesn't send an email correctly?

in Outlook, Netscape and altavista
everything is OK (HTML and Logo)

in GMX, Hotmail and yahoo,
HTML-text is correct but Logo look like Attachement

and Lycos show nothing!

#!/usr/bin/perl -w
use MIME::Lite;
use strict;

my $gid="my-Logo";
my $html='<A HREF="http://www.performaxx.de"><IMG SRC="cid:'.$gid.'"
ALT="Logo"></A> <BR><H1>E-mail as HTML</H1>text bla bla bla<I>
in HTML</I><BR> <HR>';

my $msg = MIME::Lite->new(
		From		=>'at_(at)_performaxx.de',
		To		=>'adamtuszynski_(at)_netscape.net',
		Subject	=>'test-19.03',
		Type		=>'multipart/related',
		);

my $fancy = $msg->attach(	Type		=>'text/html',
					ReadNow	=> 1,
					Data		=>$html);

$fancy->attach(
		Type		=>'image/jpeg',
		Path		=>'/usr/local/testserver/Logo.jpg',
		Id		=>$gid);

if (open(MAILER,"|/usr/lib/sendmail -t -oi -oem")) {  
		print MAILER $msg->as_string;
		close(MAILER);  
		}  

Thank you!
Adam Tuszynski
at_(at)_performaxx.de


php::bar PHP Wiki   -   Listenarchive