PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_Mime » Bug #1436

Useing addHTMLImage (latest version)

Details

Request #1436Useing addHTMLImage (latest version)
Submitted2004-05-18 22:29 UTC
Fromnykodym at email dot cz
Assignedcipri
StatusBogus
PackageMail_Mime
PHP Version4.2.2
OSLinux
Roadmaps(Not assigned)

Comments

[2004-05-18 22:29 UTC] nykodym at email dot cz

Description:
------------
How I can use addHTMLImage() to send HTML mail with images, but I don't want these images in attachment. I want them only in HTML mail.

Thanks...

Reproduce code:
---------------
<?
include('Mail.php');
include('Mail/mime.php');

$html = '<html><body>HTML version of email
<img src="top1.jpg">
</body></html>';

$crlf = "\r\n";
$hdrs = array(
'From' => 'you@yourdomain.com',
'Subject' => 'Test mime message'
);

$mime = new Mail_mime($crlf);

$mime->setHTMLBody($html);
$mime->addHTMLImage("_image_files/top1.jpg");
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail =& Mail::factory('mail');
$mail->send('nykodym@email.cz', $hdrs, $body);
?>

Expected result:
----------------
The HTML mail is recived to nykodym@email.cz adress. The mail displays image top1.jpg. But in attachement isn't image top1.jpg.

Actual result:
--------------
The HTML mail is recived to nykodym@email.cz adress. The mail displays image top1.jpg. But in attachement is image top1.jpg.