Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#47827 new defect (bug)

wp_notify_moderator email error when Site Language is fr_CA

Reported by: zzzz4's profile zzzz4 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Mail Keywords:
Focuses: Cc:

Description

WordPress version: 5.2.2
PHP version: 5.6.27
Hosting: GoDaddy

"Please moderate:" email is sent without issue when Site Language is en_US.
However, when Site Language is fr_CA, the following error occurs:

[04-Aug-2019 01:51:40 UTC] WP_Error Object
(
    [errors] => Array
        (
            [wp_mail_failed] => Array
                (
                    [0] => Could not instantiate mail function.
                )

        )

    [error_data] => Array
        (
            [wp_mail_failed] => Array
                (
                    [to] => Array
                        (
                            [0] => wpadmin@example.com
                        )

                    [subject] => [WPSite] Demande de modération pour « Foo »
                    [message] => Un nouveau commentaire sur l’article « Foo » attend votre approbation
http://blog.example.com/foo/

Auteur : JoeUser (adresse IP : xx.xx.xxx.xxx, joe.example.com)
Adresse courriel : joe_user@example.com
Adresse web : 
Commentaire : 
Commentaire en français

L’approuver : http://blog.example.com/wp-admin/comment.php?action=approve&c=12#wpbody-content
Le mettre dans la corbeille : http://blog.example.com/wp-admin/comment.php?action=trash&c=12#wpbody-content
Le marquer comme indésirable : http://blog.example.com/wp-admin/comment.php?action=spam&c=12#wpbody-content
En ce moment, 4 commentaires attendent vos approbations. Veuillez vous rendre sur le panneau de modération :
http://blog.example.com/wp-admin/edit-comments.php?comment_status=moderated#wpbody-content

                    [headers] => Array
                        (
                        )

                    [attachments] => Array
                        (
                        )

                    [phpmailer_exception_code] => 2
                )

        )

)

Change History (1)

#1 @mattumd
5 years ago

There are few possible reasons:

1- check out your mail server settings. There might be a settings for language. Also, look at below link for similar error:
https://stackoverflow.com/questions/1297084/phpmailer-error-could-not-instantiate-mail-function

2- Check if you mail plugin has language or language encoding settings

3- If none works, either re-install your plugin or change your plugin. You can also look around to see if someone else in French language using the same plugin without any issue, meaning it might be a bug in the mail plugin itself.

Good luck

Matt
https://coding-bootcamps.com/
https://myhsts.org/
https://dcwebmakers.com/

Note: See TracTickets for help on using tickets.