Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Bonk error when resending email confirmation
pwolfe
New
Hi, I'm getting a "BONK" error message whenever I try to resend an email confirmation upon signing up. The initial email after signing up was never received either. Here is the debugged error on line 688 from the php file:
forums/library/vendors/phpmailer/class.phpmailer.php
684: if (isset($old_from)) {
685: ini_set('sendmail_from', $old_from);
686: }
687: if(!$rt) {
688: throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);
689: }
690: return true;
691: }
692:
Tagged:
0
Comments
Aaah, we're getting there... You saw the Debugged error which means that you saw the detail page. At the top of the detail page of the bonk error is the actual error. Copy / Paste that error in the Vanilla Forums search box and hit Enter. See if that gives you some results.
There was an error rendering this rich post.
At the top it says:
Fatal Error in PHPMailer.MailSend();
@pwolfe Please find file in library/vendors/phpmailer/class.phpmailer.php, go to line 815 and comment out this line like I did below see if that fixes it :
//throw new phpmailerException($this->Lang('authenticate'));
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks. That worked so the BONK error doesn't appear anymore, but the email was never delivered. It isn't in my junk folder either -- nor is it in another email address that I set up for another username either.
Any suggestions or reasons why it isn't sending an email confirmation?
you need to make sure your email settings are correct using port 25 , what are your settings ? set the password to Off or try first using the local server mail system
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You can also try the contact plugin . You need to set the default email in the config.php then try sending yourself a mail.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Welcome to the community!
The code around line 688 in the
/library/vendors/phpmailer/class.phpmailer.php
file from Vanilla 2.0.18.10 is:The exception was thrown because
$rt
wasn't defined. There's also a call with$this->Lang('instantiate')
which indicates that the exception gets thrown when the mail function could not be instantiated in the MailSend method.From looking at the code before where the exception gets thrown, it looks like
$rt
is supposed to be defined by calls to PHP's mail function; however, the calls to the mail function have the@
error control operator before them, which suppresses any errors that the mail function may return.Starting at line 645 where it says
protected function MailSend($header, $body) {
and down to the last closing brace, please look for lines that start with$rt = @mail(
and replace them with$rt = mail(
, and then when you resend an email confirmation from your website, you should be able to see the exceptions that the mail function is returning in order to determine what the real error is.On the other hand, one workaround you can do to get around this error is to set up an SMTP connection in the "Outgoing Email" settings page of Vanilla if your email provider provides SMTP info.
Add Pages to Vanilla with the Basic Pages app
Thanks, I got it all sorted out. The emails are coming through now.
How did you fix the problem?
Add Pages to Vanilla with the Basic Pages app
I know, now we are left in suspense ... we should remind people that if something we said helped fix it, they need to say what it was that fixed it. I bet it was what you said that fixed it, made sense to me more so than commenting functions out.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Oh sorry, it was my bad.
I discovered I forgot to enter my email in the dashboard settings in the "outgoing mail" section settings. There wasn't anything wrong with the code or port settings etc.