문제

I'm trying to send newsletter/alerts to my site's users via Amazon SES using a CronJob.

I'm using the following php script to accomplish the delivery through SES

[http://sourceforge.net/projects/php-ses/?source=navbar][1]

include("ses.php");
$ses = new SimpleEmailService('id', 'key');
$m = new SimpleEmailServiceMessage();
$body="Test"
$m->addTo($mailId);
$m->setFrom('from@mail.com');
$m->addReplyTo('from@mail.com');
$m->setSubject('Reminder from Site.com');
$m->setSubjectCharset('ISO-8859-1');
$m->setMessageCharset('ISO-8859-1');
$m->setMessageFromString('text body',$body);
$ses->sendEmail($m);

But when I access this file (mailsend.php) via a browser, I'm getting e-mails pretty well. But when using this function triggered by a CronJob I'm getting the following error:

[08-Jul-2013 11:10:11 America/New_York] PHP Warning:
SimpleEmailService::sendEmail(): 77 error setting certificate verify locations:
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
in /home/site/public_html/files/login/ses.php on line 356

Ideas on where the problem could be?

도움이 되었습니까?

해결책

Add code

$ses->enableVerifyPeer(false);

after

$ses = new SimpleEmailService('id', 'key');
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top