FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » phpmailer
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: phpmailer [message #171479 is a reply to message #171456] Wed, 05 January 2011 09:32 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 04-01-11 21:19, smerf wrote:
> On 2011-01-04 19:30, Luuk wrote:
>> On 03-01-11 22:42, smerf wrote:
>>> In what way could I get such structure in PHPMailer
>>> (http://sourceforge.net/projects/phpmailer/):
>>>
>>> - multipart/mixed
>>> -- multipart/alternative
>>> --- text/plain
>>> --- multipart/related
>>> ---- text/html
>>> ---- image/jpeg (embedded image)
>>> -- image/jpeg (standalone attachment)
>>>
>>>
>>> General I have a problem when attach embedded image used in html and
>>> attach another image as standalone attachment.
>>> PHPMailer generates whole email as multipart/related instead of
>>> multipart/mixed as structure above.
>>>
>>> I noticed that http://swiftmailer.org/ has the same problem.
>>> Is there any good working project?
>>>
>>> Bart
>>>
>>>
>>>
>>
>>
>> <?php
>> require("class.phpmailer.php");
>>
>> ....
>>
>> Oh, BTW, this is a copy of the example i found in the file README,
>> after installing PHPMailer_v5.1.tar.gz from the website... ;-)
>>
>>
>
>
> You didn't understand me. I wrote about 2 attachments in one email
> (first is used in html body, second not).
> Your code isn't this situation.
>
> I have the same version of PHPMailer.
> Look to ./examples/test_smtp_advanced.php and please send test email.
>
> You will see this unread email in your mail client (ex. Thunderbird) in
> wrong way.
> There is no clip icon in a row. Only if you open email the clip icon
> appears.
> It's due to wrong source code of message. The correct structure should
> be as I wrote at the beginning.
>
>
>

I do see what you mean, i also dont see the clip icon in thunderbird.

When i had a look at the PHP-code, i think the problem is with the
function 'InlineImageExists'.

In this mail there are two attachments, one is 'inline', the other is
not. Because an 'inline' attachment exists, the mail gets send using
'mulipart/related' as content-type.

With the attachment that is no inline, it should be 'mulipart/mixed', if
i understand this correct.

Best way to change this would be to add a parameter to the
AddAttachment() function, which indicates wheter this is an
inline-attachment or not, and change the function InlineImageExists
accordingly...

--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Discovering all sub-classes via introspection?
Next Topic: More advanced PHP books
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 03:32:48 GMT 2024

Total time taken to generate the page: 0.03924 seconds