Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.2k views
in Q2A Core by

In my admin email, I recieved that there is a new user. 

The user told me that he cannot ask a question because he needs to click the confimation link. But he didn't received any, I told him to request another link but sitll he did not received any confimation email. I am just using the default and does not customize my own sending of confimation email, I just rely on the system. We waited for a long time but still no email.

 

A confirmation link has been emailed to you. Please click the link to confirm your email address.

 

 

Q2A version: lastest

2 Answers

0 votes
by
Same thing here. Has anyone found a solution for this?
+2 votes
by
edited by

I also had some issues with emails when I made the very first initial setup (I use SMTP).

The main issue I've found is the lack of server side logging of what was actually happening.

I've seen that q2a 1.6.2 uses PHPMailer version 2.0.4 that does not offer any debug options (I think it uses this "old" version to mantain backward compatibility with more php versions).

The more recent PHPMailer version (5.2.7) has some good debug options, so I decided to "upgrade" my q2a installation to use this version (even if I do not like the practice of modifying the core of a product that I use, since I could have in the future more work to do in the upgrading to a higher release...).

I replaced the 2 following classes :

qa-include\qa-class.phpmailer.php

qa-include\qa-class.smtp.php

with those found here :

https://github.com/PHPMailer/PHPMailer/tree/v5.2.7

(class.phpmailer.php, class.smtp.php, renaming them with prefix "qa-")

There are also a couple of lines that must be modified in the qa-class.phpmailer.php (I do not explain it here, but if needed I can give the details).

Now I have the possibility of logging everything that happens when the PHPMailer is invoked passing a couple of debug parameters when the PHPMailer is instantiated in the :

qa-include/qa-app-emails.php .

The parameters are :

$mailer->Debugoutput  = "error_log";

$mailer->SMTPDebug  = 2;
 
Debugoutput available options are : "echo" or "error_log"
SMTPDebug available options are : 0 = off, 1 = commands, 2 = commands and data
 
In production you tipically put "0" (2 is very verbose....)
 
Hope it helps.....
 
by
If the PHPMailer is not invoked, the issue is "before", in the q2a code. But in my few tests it has always been invoked when I've registered a new user.
by
Nice article.
...