Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.2k views
in Plugins by
I use amazon SES and haven't been able to configure it properly for questions2answers. In order to use the smtp class, does PHPMailer need to be installed anyways for it to work.

2 Answers

0 votes
by
edited by

The PHPMailer is distributed with the q2a software (it's required and you do not need to install it manually).

The email is sent by q2a via SMTP (that you configure in the q2a admin panel) using the PHPMailer.

About the Amazon SES SMTP service, I've read that to use it the send address has to be verified.

Have you followed all their instructions smiley

by
Thanks for your response. I actually would like to verify the message header to verify what the from address is as I did encounter an issue in the past where a script was masking the registered users address when sending a reply (SES wouldn't send it because it can only use the from email that is verified).

My address is verified and using it on several sites with SES but can't get it to work here.

I'd love to get a stack trace to see exactly where the issue is but unsure how to do so but looking into now to determine where the error occurs.
by
I see that Amazon SES offers  a console to monitor the SMTP activity, but I do not know if it allows  you to track incoming messages (and see their headers).

About q2a side, have a look here :

http://www.question2answer.org/qa/28133/confirmation-link-not-received-by-users#28918

I had to modify the phpmailer version to be able to debug the SMTP invocations.
If you enable the SMTPDebug flag you'll be able to see all the header's fields of the message (Return-path, To, From, X-priority, X-Mailer and so on....).
0 votes
by
I went thru the code line by line to debug and the error occurs on line 566 of qa-class.phpmailer

if(!$this->smtp->Data($header . $body))

I stepped through the code and it connects and authenticates properly but when it arrived at the line above, it crashes. Any tips on outputting the $header or $body variables?
by
edited by
see the link that I sent to you before.
you should see also the full returned data provided with the SMTP protocol
by
Thanks so much for your help, enabling the debug variable helped pinpoint the problem. SES is very finicky in that it can only send from verified emails as you said and I was using the feedback form for testing.

But I guess the feedback form uses the email from the logged-in user in the 'Your email: (optional)' as the sender so I was getting this error: FROM SERVER: 554 Message rejected: Email address is not verified.

When I replaced the email in the textbox with my email I entered in my smtp settings, it was sent. So, I'll modify the code so that it gets sent from my smtp email versus but cc the user if he/she supplies an email in the feedback form.

Cheers
Armand
...