PHPMailer Embedded Attachments

Tuesday, 5th December 2006

This is partly for me and partly for anyone who is currently hunting high and low for a solution to a problem I was having with PHPMailer and embedded images in HTML emails. The problem was that despite me being confident my code to insert the image was right, it was still appearing as an attachment (in Thunderbird at least). It turns out that the problem was the content type declaration, Thunderbird is very strict in it’s settings for attachments and doesn’t like the default application/octet-stream setting if you’re attaching images, so you have to make sure to set it correctly for the image you are embedding. I can’t take the credit, I found the answer on the sourceforge mailing list, after digging, a lot.

Hopefully, when Google gets here, that’ll save someone some head scratching.

  • Print This Post/Page | Print
  • Comment on this post | Comment

Related Articles

This article was posted in General, you might find the following articles interesting, they're supposed to be related.

  • PC Security

    It seems like barely a week goes by without a story about computers being hacked, a virus being spre ...

  • Online Security

    As someone who seems to know something about IT, I get asked a lot of questions by friends, family a ...

  • Your Start Page

    As you may have noticed, most web browsers let you set a start page, or in the case of newer tabbed ...

  • HTML for Everyone

    While reading an (excellent) article on how to build a better web browser (hat tip: Matt) I started ...

  • Petrolheads

    There has been plenty of coverage of the status of the world's oil reserves of late. This has broug ...

Comments

↑ TOP

Write a Comment




* - Required

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>