Search code examples
amazon-web-servicesamazon-ses

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


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']);

Solution

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

    "John Doe" <[email protected]>

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