Hi,
I have some problem. The Contact Form can't work. Reason is SMTP code Fail.
I had add email and name in phpmailer.php and use AWS SES SMTP.
I try to debug via remove the receive code from form and rewrite a test php. It's work. I think all parameter and setting is correct.
But if I connect form and phpmailer, doesn't Work.
Could you help me?
Contact Form (phpmailer) doesn't Work in AWS EC2 service (via AWS SES SMTP)
4 replies · opened Jun 21, 2017
Hello,
Please consider using these Docs: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-php.html for using PHPMailer with AWS SES SMTP.
The difference is the following 2 Lines of Code:
// Enable SSL encryption
$mail->SMTPSecure = 'ssl';
// The port you will connect to on the Amazon SES SMTP endpoint.
$mail->Port = 465;This should definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Hi,
It is still not work, actually ssl+465 and tls+587 , both are allow the SES guiding.
I try to solve it line by line.
The main issue in LINE 48$mail->SetFrom( $toemail['email'] , $toemail['name'] );//( $email , $name );
AWS SES only allow verified email, so that I change LINE48 to$mail->setFrom('email@mydomain.com', 'Name');
It's work, FYI.
Hi,
It is still not work, actually ssl+465 and tls+587 , both are allow the SES guiding.
I try to solve it line by line.
The main issue in LINE 48$mail->SetFrom( $email , $name );
AWS SES only allow verified email, so that I change LINE48 to$mail->setFrom('email@mydomain.com', 'Name');
It’s work, FYI.
Hello,
Yes! Thank you for pointing us to this! Sometimes, the Emails are not allowed because the Email Domain set in the $mail->setFrom Option should be from the same Server as your SMTP Server.
This will definitely fix the issue. Thank You so much again.
Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard