Image in Email Subject using PHP

 ̄綄美尐妖づ 提交于 2019-12-10 22:54:27

问题


I want to add image like company logo in email subject using php mail function i have added

$subject = "<img src=\"https://www.donndraper.com/images/logo.png\" width=\"50px\">"); 
$header = "From: $email\n Content-Type: text/HTML;";

回答1:


What JerrySeeger was trying to say, in a fairly condescending manner, is that e-mail does not support images in the subject.

The SMTP protocol was designed 20 years before HTML was even invented.

What you desire is simply not possible.




回答2:


You cannot include custom images (such as your company logo), however, there are a limited number of Unicode images that you can use in the header.

Some clients render them by using color images rather than treat them as characters in a font. The following article has a few images comparing how various mobile devices render them:

  • Symbols in Subject Lines: How to Get Your Email Noticed

And you can see Wikipedia for a long list of the available characters, and if for some reason your font does not support those characters, the second link are bitmap renders of those characters:

  • Wikipedia: Miscellaneous Symbols
  • Online Uniode Character Map



回答3:


@GUS well said.. and you guys are all wrong.

You may use any unicode utf-8 or Base64 in mail subject and latest Trend in mass Mailers. its pretty easy to implement .



来源:https://stackoverflow.com/questions/17087660/image-in-email-subject-using-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!