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 on "Click here to resend the confirmation email."

TurbolegoTurbolego New
edited February 2012 in Vanilla 2.0 - 2.8

I followed these steps in order to get a detailed error message: BONK on FACEBOOK LOGIN

This is the error message i got:

Fatal Error in PHPMailer.MailSend();

Could not instantiate mail function.

The error occurred on or near: /customers/6/e/c/turbolego.com/httpd.www/finnvegg/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:

Backtrace:

[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php:579] PHPMailer->MailSend();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.email.php:202] PHPMailer->Send();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/models/class.usermodel.php:2067] Gdn_Email->Send();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] UserModel->SendEmailConfirmationEmail();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] EntryController->EmailConfirmRequest();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.dispatcher.php:322] PHP::call_user_func_array();
[/customers/6/e/c/turbolego.com/httpd.www/finnvegg/index.php:53] Gdn_Dispatcher->Dispatch();

Additional information for support personnel:

Application: Vanilla
Application Version: 2.0.18.1
PHP Version: 5.3.10
Operating System: Linux
Server Software: Apache
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Request Uri: /finnvegg/entry/emailconfirmrequest
Controller: PHPMailer
Method: MailSend

You can reproduce this error by going here after trying to register: http://turbolego.com/finnvegg/entry/emailconfirmrequest

Answers

  • TurbolegoTurbolego New
    edited February 2012

    So i'm trying to use a SMTP Server to fix this problem, as suggested in this thread: Solved: E-Mail verification was not sent

    I used the following settings as directed by this article: Configuring other mail clients

    SMTP Host: smtp.gmail.com
    SMTP User: turbolego@gmail.com
    SMTP Password: ***
    SMTP Port: 587
    SMTP Security: TLS
    

    Now i'm getting a similair error message:

    Fatal Error in PHPMailer.SmtpConnect();

    SMTP Error: Could not connect to SMTP host.

    The error occurred on or near: /customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php

    817: }

    818: }
    819: $index++;
    820: if (!$connection) {
    821: throw new phpmailerException($this->Lang('connect_host'), self::STOP_SERVER);
    822: }
    823: }
    824: } catch (phpmailerException $e) {
    825: $this->smtp->Reset();

    Backtrace:

    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php:706] PHPMailer->SmtpConnect();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php:577] PHPMailer->SmtpSend();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.email.php:202] PHPMailer->Send();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/models/class.usermodel.php:2067] Gdn_Email->Send();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] UserModel->SendEmailConfirmationEmail();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] EntryController->EmailConfirmRequest();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.dispatcher.php:322] PHP::call_user_func_array();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/index.php:53] Gdn_Dispatcher->Dispatch();

    Additional information for support personnel:

    Application: Vanilla
    Application Version: 2.0.18.1
    PHP Version: 5.3.10
    Operating System: Linux
    Server Software: Apache
    User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
    Request Uri: /finnvegg/entry/emailconfirmrequest
    Controller: PHPMailer
    Method: SmtpConnect
    

    You can reproduce this error by going here after trying to register: http://turbolego.com/finnvegg/entry/emailconfirmrequest

  • Mind you, the email confirmation worked fine 3 hours ago.

  • TurbolegoTurbolego New
    edited February 2012

    I've turned off "Require users to confirm their email addresses (recommended)" option until i get some feedback on my problem. Thus reproducing the problem(s) will not be possible at this time.

    Thanks in advance for any help. =]

  • I've also tried:

    smtp.googlemail.com
    ports: 25, 465 and 587
    no encryption, ssl, tls

    smtp.live.com
    ports: 25 and 587
    tls

    no dice.

    Any other smtp hosts i can try? =]

  • i never had any luck routing through gmail. I have an SMTP host for which i pay for service. sorry i can't give out credentials to my hosts.

  • Did you get the same error when you tried using gmail?

    I would like to know if this error is because of gmail, before i might end up paying for a service i won't need to fix this problem.

    Thanks for answering. =)

    hbf said:
    i never had any luck routing through gmail. I have an SMTP host for which i pay for service. sorry i can't give out credentials to my hosts.

  • Here is the solution!
    I found out that my host, one.com, has a mail service with SMTP.
    After contacting one.com, i got these settings:

    Mail host: send.one.com
    Port: 25
    Authentication: Yes (SSL on)

    Mail host: mailout.one.com
    Port: 25
    Authentication: No (SSL disabled)

    send.one.com gives me the same error as with gmail, no connection, but mailout.one.com gives me a connection, but can't authenticate.

    Error message:

    Fatal Error in PHPMailer.SmtpConnect();

    SMTP Error: Could not authenticate.

    The error occurred on or near: /customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php

    811:

    812: $connection = true;
    813: if ($this->SMTPAuth) {
    814: if (!$this->smtp->Authenticate($this->Username, $this->Password)) {
    815: throw new phpmailerException($this->Lang('authenticate'));
    816: }
    817: }
    818: }
    819: $index++;

    Backtrace:

    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php:706] PHPMailer->SmtpConnect();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/vendors/phpmailer/class.phpmailer.php:577] PHPMailer->SmtpSend();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.email.php:202] PHPMailer->Send();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/models/class.usermodel.php:2067] Gdn_Email->Send();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] UserModel->SendEmailConfirmationEmail();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/applications/dashboard/controllers/class.entrycontroller.php:1340] EntryController->EmailConfirmRequest();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/library/core/class.dispatcher.php:322] PHP::call_user_func_array();
    [/customers/6/e/c/turbolego.com/httpd.www/finnvegg/index.php:53] Gdn_Dispatcher->Dispatch();

    Additional information for support personnel:

    Application: Vanilla
    Application Version: 2.0.18.1
    PHP Version: 5.3.10
    Operating System: Linux
    Server Software: Apache
    Referer: http://turbolego.com/finnvegg/discussions
    User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
    Request Uri: /finnvegg/entry/emailconfirmrequest
    Controller: PHPMailer
    Method: SmtpConnect

    To compare the errors from gmail/send.one.com and mailout.one.com, here are a couple screenshots:
    gmail/send.one.com

    mailout.one.com

    The agent "Aubrey" over at one.com suggested: "I have verified the settings and the correct settings to use in a script should be mailout.one.com , port 25 and no smtp authentication. No authentication means password is not required and SSL is not yet supported to be setup in any sending scripts."

    So i tried these settings:

    SMTP Host mailout.one.com
    SMTP User turbolego@turbolego.com
    SMTP Password NONE
    SMTP Port 25
    SMTP Security NONE

    Got the same error. (got connection, but no authentication).

    Then the agent suggested "Based on the error, it seems that Authentication by default is enabled in your application settings. Try to set the password with OFF instead of a blank space."

    "Please access class.phpmailer.php, go to line 815 and comment out this line : throw new phpmailerException($this->Lang('authenticate'));
    Aubrey: Check again is issue persist."

    And this fixed the problem!
    The confirmation mails works flawlessly now, thanks to "Aubrey" @ one.com :)

  • good ole Aubrey

  • Instead of commenting out the line 815 in class.phpmailer.php file, you can add the additional check if (! empty($this->SMTPSecure)). If SMTPSecure is set to "None" in the Dashboard, its value is "", then (! empty($this->SMTPSecure)) would be false, which no exception will be thrown.

Sign In or Register to comment.