Sending mail via php in EC2

Posted by william007 on Server Fault See other posts from Server Fault or by william007
Published on 2012-09-17T01:59:52Z Indexed on 2012/09/17 3:39 UTC
Read the original article Hit count: 417

Filed under:
|
|

I have used the following code for sending mail using php using amazon ec2, but I only see 'aatest' as the result, and doesn't get any incoming email. Btw, I have already included ses.php, and have validated the email [email protected], and double confirm that accesskey, and accesskey are the correct one. Can anyone suggest way for debugging it?

require_once('ses.php');
$con=new SimpleEmailService('accesskey','accesskey');
print_r('aa'.$con->listVerifiedEmailAddresses());


$m = new SimpleEmailServiceMessage();
$m->addTo('[email protected]');
$m->setFrom('[email protected]');
$m->setSubject('Hello, world!');
$m->setMessageFromString('This is the message body.');
print_r($con->sendEmail($m));
echo 'test';

© Server Fault or respective owner

Related posts about php

Related posts about amazon-ec2