我终于让 SES 工作了,但现在我遇到了另一个问题
发送的电子邮件amazonses.com
在from和mailed-by字段中留下了像这样的
我目前正在沙箱访问
from: name@myDomain.com via amazonses.com
to: john@aol.com
date: Sat, Jun 2, 2012 at 3:30 PM
subject: Subject message
mailed-by: amazonses.com
问题:如何amazonses.com
从这 2 个文件中删除并将“邮寄者”字段替换为我公司的电子邮件地址?
这是我的php
function sendMail($to, $subject, $message, $from ) {
require_once('sdk-1.5.6.2/sdk.class.php');
$AWS_KEY = "********************";
$AWS_SECRET_KEY = "****************************************";
$amazonSes = new AmazonSES(array( "key" => $AWS_KEY, "secret" => $AWS_SECRET_KEY ));
$response = $amazonSes->send_email(
$from,
array('ToAddresses' => array($to)),
array(
'Subject.Data' => $subject,
'Body.Html.Data' => $message,
)
);
if (!$response->isOK()) {
return false;
}else {
return true;
}
return false;
}
sendMail('john@aol.com', "Body message", "Subject message", "name@myDomain.com" );