I’m wanting to use a php variable as the destination email for Amazon SES using the aws php sdk… the following are the relevant lines of code
$email = new AmazonSES();
$recip = array("ToAddresses"=>"$email");
$message = array("Subject.Data"=>"Welcome to Weather Warnings","Body.Text.Data"=>"tester");
$email->send_email("me@mydomain.com",$recip, $message);
my error is…. the line where the recip variable is set is line 31
Catchable fatal error: Object of class AmazonSES could not be converted to string in /home/websites/wxwarn/customer/register.php on line 31
$email is type of AmazonSES, so it can’t be a email Adresse
you have to use an another var for the adress
hi im not at home and can’t look in my code but i think you have to type:
look here:
http://www.alexkorn.com/blog/2011/04/sending-email-aws-php-with-amazonses/