我正在使用源于github的SES库https://github.com/daniel-zahariev/php-aws-ses

时间:2014-06-03 13:48:25

标签: php amazon-web-services amazon-ses

PHP警告:simplexml_load_string():实体:第1行:解析器错误:期望开始标记,'<'在第143行的/path/ses/SimpleEmailServiceRequest.php中找不到

https://github.com/daniel-zahariev/php-aws-ses

var_dump的结果是bool(false)

我的代码如下。为什么我无法发送电子邮件,因为电子邮件已经过验证,域名也已经过验证。

require_once( "SimpleEmailService.php" );
require_once( "SimpleEmailServiceMessage.php" );
require_once( "SimpleEmailServiceRequest.php" );

$ses    = new SimpleEmailService('access id', 'secret key');

$m      = new SimpleEmailServiceMessage();

$m->addTo('shahfaisal106@hotmail.com');
$m->setFrom('vizzwebsol@gmail.com');
$m->addCC('shahfaisal106@hotmail.com');
$m->addCC(array('shahfaisal106@hotmail.com', 'shahfaisal106@hotmail.com'));
$m->addBCC('shahfaisal106@hotmail.com');
$m->addBCC(array('shahfaisal106@hotmail.com', 'shahfaisal106@hotmail.com'));
$m->addReplyTo('vizzwebsol@gmail.com');
$m->addReplyTo(array('vizzwebsol@gmail.com', 'vizzwebsol@gmail.com'));
$m->setReturnPath('vizzwebsol@gmail.com');
$m->setSubject('Sending Welcome Email Through Amazon!');
$m->setMessageFromString('This is the message body.');
//print_r( $m );exit;
var_dump($ses->sendEmail($m));
//print_r($ses->sendEmail($m));

0 个答案:

没有答案