PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime » Bug #6926

Mail_Mime: addHTMLImage add multiple attachments

Details

Submitted2006-02-24 14:06 UTC
Fromcezar at ime dot usp dot br
Assignedcipri
StatusNo Feedback
PackageMail_Mime
PHP Version5.1.0
OSirrelevant
Roadmaps(Not assigned)

Comments

[2006-02-24 14:06 UTC] cezar at ime dot usp dot br

Description:
------------
addHTMLImage add the same image two or more times if they appears more than one time. (look in the source of email)

Test script:
---------------
MIME CONTENT CODE:

<img src="teste.jpg">
A short test script you wrote that demonstrates the bug.
<img src="teste.jpg">
Please do not post more than 20 lines of code.

PHP CODE:

$imagem = file_get_contents("teste.jpg");
addHTMLImage($imagem,"image/jpeg","imagem1.jpg",false);

Expected result:
----------------
Only one attachment:

Content-Type: application/octet-stream; name="imagem1.jpg"
Content-Transfer-Encoding: base64
...

Actual result:
--------------
Two attachments with the same name:

------=_NextPart_94915C5ABAF209EF376268C8
Content-Type: application/octet-stream; name="imagem1.jpg"
Content-Transfer-Encoding: base64
...

------=_NextPart_94915C5ABAF209EF376268C8
Content-Type: application/octet-stream; name="imagem1.jpg"
Content-Transfer-Encoding: base64
...