Amazon SES using PHP SDK doesn't work? -


i've been trying send emails using amazon ses sdk php , since i've switched hosts doesn't work. here's script:

$usrmessage = 'hello, testing'; $usrto = 'test@test.com';  //amazon ses - getting client ready require 'amazon/aws.phar'; use aws\ses\sesclient; error_reporting(1); @ini_set('display_errors', 1); $client = sesclient::factory(array(   'key'    => '[private]',   'secret' => '[private]',   'region' => 'eu-west-1' )); //end of amazon ses  $msg = array(); $msg['source'] = "test <test@test.com>"; //toaddresses must array $msg['destination']['toaddresses'][] = $usrto; $msg['message']['subject']['data'] = "download link freebie"; $msg['message']['subject']['charset'] = "utf-8"; $msg['message']['body']['text']['data'] ="text data of email"; $msg['message']['body']['text']['charset'] = "utf-8"; $msg['message']['body']['html']['data'] = $usrmessage; $msg['message']['body']['html']['charset'] = "utf-8";  $result = $client->sendemail($msg);    //end of amazon ses script 

as mentioned, works fine on localhost , on old hosting account doesn't work on servers of new hosting provider. script doesn't work , no error report shown, blank page...

i tried echo line after second comment doesn't show suppose it's issue when requesting aws.phar (the file present in appropriate folder)

i think might issue on webhosting company's side, have ideas?

it looks issue old php version. if experiences this, go cpanel -> "select php version" , switch php version newer 1 , select necessary extensions. switched php 7.0 , works fine.


Comments