#47827 closed defect (bug) (worksforme)
wp_notify_moderator email error when Site Language is fr_CA
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | 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 (3)
#2
@
4 months ago
- Resolution set to worksforme
- Status changed from new to closed
Reproduction Report
Description
❌ This report can't validate that the issue can be reproduced.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.29
- Server: nginx/1.29.0
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.29)
- Browser: Chrome 138.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.3
- MU Plugins: None activated
- Plugins:
- Testing Dolly
- Test Reports 1.2.0
Testing Instructions
- Set my mail server
- Switch the WP language to fr_CA (french Canadian)
- Enable Reglagles > Discussion > Un commentaire est en attente de modération enabled
- Send a new comment to a post with a not logged in session
- ❌ Moderation email is received as expected
Actual Results
- ❌ Error condition is not occurring
Additional Notes
- Looking at the error, all I can see is that there was a problem sending using
mailfunction in your server, completely unrelated to the fact thatfr_CAcould be involved.
- Anyway, because I don't want to be guilty of imprudence I've tested and its not reproducible, below, you can check the Canadian French received raw email
- For this reason, I'm going to be closing this ticket as
worksforme. Feel free to comment back if you happen to find some new reproduction instructions like the ones I've provided so I could test it again and confirm a potential issue.
Supplemental Artifacts
Return-Path: <wordpress@alphabetisierung.at>
Received: from localhost (unknown [172.20.0.1])
by 3ace0024e0b8 (Mailpit) with SMTP
for <test@example.com>; Sun, 3 Aug 2025 13:10:47 +0000 (UTC)
Date: Sun, 3 Aug 2025 13:10:47 +0000
To: test@example.com
From: WordPress <wordpress@alphabetisierung.at>
Subject: =?UTF-8?Q?[WordPress_Develop]_Demande_de_mod=C3=A9ration_pour_=C2=AB_Hello_world!_=C2=BB?=
Message-ID: <BNS0vRs9UJW1qv2rSWS8MktEO6bB9itmLUPqR6OOoPw@localhost>
X-Mailer: PHPMailer 6.9.3 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Un nouveau commentaire sur l’article « Hello world! » attend votre approbation
http://localhost:8889/2025/07/23/hello-world/
Auteur : fasdfasdf (adresse IP : 172.20.0.1, 172.20.0.1)
Adresse courriel : fasdfasdf@fdsafdas.com
Adresse web :
Commentaire :
fadsfasdfdas
L’approuver : http://localhost:8889/wp-admin/comment.php?action=approve&c=5#wpbody-content
Le mettre dans la corbeille : http://localhost:8889/wp-admin/comment.php?action=trash&c=5#wpbody-content
Le marquer comme indésirable : http://localhost:8889/wp-admin/comment.php?action=spam&c=5#wpbody-content
En ce moment, 4 commentaires attendent vos approbations. Veuillez vous rendre sur le panneau de modération :
http://localhost:8889/wp-admin/edit-comments.php?comment_status=moderated#wpbody-content
Note: See
TracTickets for help on using
tickets.
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/