发送带有个人资料图片PHP邮件功能的电子邮件 [英] Send email with profile picture PHP mail function

查看:141
本文介绍了发送带有个人资料图片PHP邮件功能的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的用户的收件箱收到我的网站发送的PHP电子邮件时,我想在他们的收件箱中显示个人资料图片。

I would like to show a profile picture in my users inbox when they receive an email sent from my website with PHP.

在此图中,第一封电子邮件来自我的网站,第二封电子邮件是我想要的。

In this image the first email is from my website and the second one is what I want.

这是我的PHP邮件功能:

And here is my PHP mail function:

            $emailTo=$_POST['emialNewPass'];
            $emailSubject="Recovery";
            $emailLoctuz="noreply@loctuz.com";
            $message="msg";

            $headers  = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                            // En-têtes additionnels
            $headers .= 'To: '.$emailTo."\r\n";
            $headers .= 'From: Loctuz Security <'. $emailLoctuz . '>' ."\r\n";

            if(@mail($emailTo,$emailSubject,$message, $headers))
            {
                ?><script>window.location = "?sent";</script><?php                  
            }


推荐答案

经过研究和测试,我发现:

After research and testing I found:


  1. 没有没有程序化方式来影响个人资料图片。

  2. 将个人资料图片应用于Gmail收件人的收件箱的最佳方法是创建Google+帐户作为发送地址并将个人资料图片添加到它(在下面有更多内容)

  3. 其他电子邮件服务和收件箱(包括航空邮件,麻雀,邮政信箱和Thunderbird)都使用 Gravatar (在下面有更多内容)

  4. 我确定有些电子邮件服务没有被这件事感动...

  1. There is no "programmatic" way to affect the profile picture.
  2. The best way to apply a profile picture to Gmail recipients' inboxes is to create a Google+ account for the sending address and add a profile picture to it (more below)
  3. Other email services and inboxes (including Airmail, Sparrow, Postbox, and Thunderbird) use Gravatar (more below)
  4. I'm sure there are email services not touched by this...

使用Google+可以将个人资料照片添加到Gmail:


  1. 转到 http://plus.google.com/

  2. 如果您已经登录,请注销

  3. 单击使用其他帐户

  4. 单击更多选项->创建帐户

  5. 输入名字和姓氏

  6. 在选择您的用户名下,单击我希望使用我的当前电子邮件地址

  7. 输入要发送的带有个人资料图片的电子邮件地址转到您的电子邮件地址字段

  8. 填写其余字段

  9. 创建帐户后,在单击右上角的,然后单击更改:您的个人资料照片应位于的位置。上传个人资料照片

  10. 现在等待一两天!我的新Google+个人资料照片花了将近24小时才能传播到我的Gmail收件箱中的电子邮件中。在此等待期间,我还删除了该地址中的所有电子邮件(并将其永久删除到垃圾箱->永久删除),还从我的Gmail联系人中将其删除。

  11. 大约一天后,我能够从有问题的地址向自己发送电子邮件,并在我的Gmail收件箱中看到我上传到Google+的个人资料照片:)

  1. Go to http://plus.google.com/
  2. If you are already logged in, log out
  3. Click "Use another account"
  4. Click "More options" -> "Create account"
  5. Enter first and last name
  6. Under Choose your username click "I prefer to use my current email address"
  7. Enter the email address you want to send from with a profile picture to the "Your email address" field
  8. Fill out the rest of the fields
  9. Once your account is created, click your profile in the top right, and click "Change: where your profile picture should be. Upload a profile picture
  10. Now wait for a day or two! It took almost 24 hours for my new Google+ profile picture to propagate to emails in my Gmail inbox. During this waiting period, I also deleted (and went to Trash->Delete forever) all emails from the address, and also removed it from my Gmail Contacts.
  11. After a day or so, I was able to send an email to myself from the address in question and see the profile picture I uploaded to Google+ in my Gmail inbox :)

使用Gravatar将个人资料照片添加到其他收件箱:


  1. 转到 http://gravatar.com/

  2. 点击登录并登录(如果尚未登录)

  3. 添加电子邮件地址-使用该电子邮件地址发送带有个人资料图片的表单

  4. 上传图片

  1. Go to http://gravatar.com/
  2. Click Sign In and sign in if you are not already
  3. Add an email address - use the email address to want to send form with a profile picture
  4. Upload an image

这篇关于发送带有个人资料图片PHP邮件功能的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆