本文介绍了Amazon SES使用PHP显示发件人名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用本指南发送使用Amazon SES的电子邮件:

I've been following this guide to send emails using Amazon SES: http://www.codeproject.com/Articles/786596/How-to-Use-Amazon-SES-to-Send-Email-from-PHP

这工作正常,我能够发送电子邮件。
我想要的是,当接收者收到电子邮件时,也可以显示发件人的姓名而不是电子邮件地址。

This worked fine and I was able to send emails.What I want is to also be able to display the name of the sender instead of just the email address when the receiver gets the email.

我目前现在是:

$msg = array();
$msg['Source'] = "[email protected]";

我该如何添加名字?我以前使用过swiftmailer,这与 [email protected]'=>我的名字一起使用。但是,这并不适用于亚马逊SES,至少不在我的脚本中。

How can I also add a name to this? I was previously using swiftmailer and this worked with "[email protected]' => 'My Name'". This, however, doesn't work with amazon SES, at least not in my script.

推荐答案

我想出来了。如果任何人有相同的问题,就像下面的例子中的格式一样:

I figured it out. If anyone has the same issue just format it like in the example below:

$msg['Source'] = "My Name <[email protected]>";

这篇关于Amazon SES使用PHP显示发件人名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-08 12:48