Cannot send raw email
mtetno opened this issue · 1 comments
mtetno commented
I have tried using this library for aws ses but i m not able to send raw email via below code ,
please point me the issue incase i m wrong anywhere , i have tried all api mentioned and tried to send atachment also but the email appears to be unformated
<?php
require_once 'vendor/autoload.php';
error_reporting(E_ALL); ini_set('display_errors', '1');
$m = new SimpleEmailServiceMessage();
$m->addTo($_REQUEST['email']);
$m->setFrom('cc@cc-in-cc.com');
$m->setSubject('Roti receipt');
$m->setMessageFromURL('http://xxxxxxx/phpMailer/email_template.txt');
$m->addAttachmentFromData('email_template.txt', 'Simple content', 'text/plain');
$region_endpoint = SimpleEmailService::AWS_US_EAST_1;
$ses = new SimpleEmailService('xxxxx', 'xxxxxxxx+xxxxxx', $region_endpoint);
// Or overwrite the main setting on a single call
$use_raw_request = true;
$trigger_error = false;
$ses->sendEmail($m, $use_raw_request, $trigger_error);
?>
daniel-zahariev commented
Have you validated the sender email? What error do you get?