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.

Sending emails causes error

Emails to confirm email address are not sent out.
When I go to email then press "Send a test email" The follow pops up on my screen:
"Whoops! There was an error."
I set up a valid email and name and checked the box to not include usernames in the to field.
I set up a postfix server on the same machine, and it works
I can send and receive emails using both the mail and s-nail command and if I write a simple php script using mail() function then run it from the shell that works.
So evidently postfix works, my vps provider does not block it, and php is configured to allow it.
I am running:
ubuntu 17.10
php 7.1
ngnix 1.12.1


  • Options

    So this happens when I tell it to send an email:

    FATAL ERROR IN: Gdn_Email.subject();

    "Call to undefined function mb_encode_mimeheader()" LOCATION: /usr/share/nginx/html/forums/library/core/
    > 371: * @param string $subject The subject of the message.
    > 372: * @return Gdn_Email
    > 373: */
    > 374: public function subject($subject) {
    >>> 375: $this->PhpMailer->Subject = mb_encode_mimeheader($subject, $this->PhpMailer->CharSet);
    > 376: return $this;
    > 377: }
    > 378: > 379: public function addTo($recipientEmail, $recipientName = '') { BACKTRACE:
    [/usr/share/nginx/html/forums/applications/dashboard/controllers/class.settingscontroller.php 986] Gdn_Email->subject();
    [/usr/share/nginx/html/forums/library/core/class.dispatcher.php 832] SettingsController->emailTest();
    [/usr/share/nginx/html/forums/library/core/class.dispatcher.php 261] Gdn_Dispatcher->dispatchController();
    [/usr/share/nginx/html/forums/index.php 29] Gdn_Dispatcher->dispatch();

    And the whole Time I'm on my site I see this notice:

    Gdn_PluginManager::registerHandler is deprecated.

    [internal function]: gdn_ErrorHandler(16384, 'Gdn_PluginManag...', '/usr/share/ngin...', 841, Array)
    /usr/share/nginx/html/forums/library/core/functions.general.php(841): trigger_error('Gdn_PluginManag...', 16384)
    /usr/share/nginx/html/forums/library/core/class.pluginmanager.php(668): deprecated('Gdn_PluginManag...')
    /usr/share/nginx/html/forums/library/core/class.pluginmanager.php(743): Gdn_PluginManager->registerHandler('VanillaStatsPlu...', 'StatsDashboard', 'SettingsControl...', 'home', 'method')
    /usr/share/nginx/html/forums/plugins/VanillaStats/class.vanillastats.plugin.php(61): Gdn_PluginManager->registerNewMethod('VanillaStatsPlu...', 'StatsDashboard', 'SettingsControl...', 'home')
    [internal function]: VanillaStatsPlugin->gdn_dispatcher_beforeDispatch_handler(Object(Gdn_Dispatcher), Array)
    /usr/share/nginx/html/forums/library/Garden/EventManager.php(278): call_user_func_array(Array, Array)
    /usr/share/nginx/html/forums/library/core/class.pluginmanager.php(806): Garden\EventManager->fire('gdn_dispatcher_...', Object(Gdn_Dispatcher), Array)
    /usr/share/nginx/html/forums/library/core/class.pluginmanager.php(765): Gdn_PluginManager->callEventHandler(Object(Gdn_Dispatcher), 'Gdn_Dispatcher', 'BeforeDispatch', 'handler')
    /usr/share/nginx/html/forums/library/core/class.pluggable.php(133): Gdn_PluginManager->callEventHandlers(Object(Gdn_Dispatcher), 'Gdn_Dispatcher', 'BeforeDispatch')
    /usr/share/nginx/html/forums/library/core/class.dispatcher.php(223): Gdn_Pluggable->fireEvent('BeforeDispatch')
    /usr/share/nginx/html/forums/index.php(29): Gdn_Dispatcher->dispatch()

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    edited January 2018

    "Call to undefined function mb_encode_" is a good hint. Looks like you do not have enabled the PHP mbstring extension, which is a requirement for Vanilla

  • Options

    Yes. That fixed it.
    I had it running in debug mode but it was only showing me some errors, not all. Then I turned it off and on, like hours later, and then I could see the long errors every time. It was only at that point could I even post the error.
    Thanks for the help

Sign In or Register to comment.