问题
When I send an email to somebody, there is this avatar of me (in this case from my Google+ account)
How can I extend my PHP mail()
function to add an avatar in the emails?
回答1:
These avatars are a feature provided by the used mail client, e.g.:
- GMail will show the user's Google+ profile avatar if available
- Apple Mail will show the user's avatar shown in your address book
- etc.
So the avatar is not part of the mail itself.
Two workaround suggestions:
- Use a GMail sender address assigned to your Google+ profile.
- Add a VCard as attachement, see Formatting VCard in PHP and http://www.xmpp.org/extensions/xep-0153.html#publish - so the recipient gets a VCard to import into his address book.
来源:https://stackoverflow.com/questions/25282933/php-mail-set-from-image