Welcome Guest, Not a member yet? Register   Sign In
What is the trick to get SMTP to work on AWS SES?
#1

My code:
$email = \Config\Services::email();
$email->protocol = 'smtp';
$email->SMTPCrypto = 'tsl';
$email->SMTPHost = 'email-smtp.us-west-2.amazonaws.com';
$email->SMTPUser = 'xxxx';
$email->SMTPPass = xxxx';
$email->SMTPPort = 587;
$email->newline  = "\r\n";
$email->setFrom('[email protected]', 'Company Name');
$email->setTo('[email protected]');
$email->setSubject('Email Test');
$email->setMessage('Testing the email class.');
$email->send(false);
echo $email->printDebugger();

The response:
Unable to send email using SMTP. Your server might not be configured to send mail using this method.

The email address I am sending from exists on the server, which is setup through Plesk.
Reply
#2

$email->SMTPCrypto = 'tls';
Reply
#3

I have tried both TLS and SSL, 465 and 587. I verified the SMTP credentials and endpoint, but I still get this error.
Reply
#4

Sorry for commenting a bit late, but I wanted to ask if the error has been resolved properly now. Is there any way to fix it because I just now encountered this situation.
Reply
#5
Bug 

Hey,
seems to be a typo there "tls" not "tsl"

cheers
Reply




Theme © iAndrew 2016 - Forum software by © MyBB