How can set name for source/from attribute on sent emails?

烂漫一生 提交于 2019-12-10 00:51:56

问题


I'm using aws-sdk-for-php and using AmazonSES for sending email. The problem is I want to set the name for the email. Example:

指定 < email_address >

Here my source code:

$mailer = new \AmazonSES( $aws_config ); $response = $mailer->send_email($mail_data['from'],$mail_data['to']);

回答1:


I believe the format you're looking for is as follows:

"John Doe" <johndoe@example.com>

Reference: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/email-format.html



来源:https://stackoverflow.com/questions/22141041/how-can-set-name-for-source-from-attribute-on-sent-emails

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