I have configured aws's ses service but have not been able to use it. My emails are being sent but they are sent through my hosting server (Godaddy) and I would want to send them only through AWS's SES. Pardon me, if I have made a rookie mistake.
Here's what my code looks like
<?php require 'PHPMailerAutoload.php'; require 'class.phpmailer.php'; $mail = new PHPMailer; $mail->SMTPDebug = 2; $mail->Host = 'email-smtp.eu-west-1.amazonaws.com'; $mail->Port = 25; $mail->ssl = true; $mail->authentication = true; $mail->Username = 'username'; $mail->Password = 'password'; $mail->setFrom('[email protected]', 'Test Email'); $mail->Body = 'Test Email from Zigsaw'; $mail->AddReplyTo('[email protected]', 'Candidate'); $mail->addAddress('[email protected]', 'Recruiter'); $mail->Subject = 'Test Email from Zigsaw'; if(!$mail->send()) { echo "Email not sent. " , $mail->ErrorInfo , PHP_EOL; } else { echo "Email sent!" , PHP_EOL; } ?> Disclaimer: My file is hosted on a godaddy server and I am trying to send emails through AWS SES.
$mail->ssl = true;is completely fictional. Base your code on the examples provided with PHPMailer, and use the latest version.