admin管理员组文章数量:1122826
My wordpress admin area does not seem to be able to send mails. For an example, I tried to change the admin mail address, but I never received the confirmation mail and had to use the plugin Change Admin Email Setting Without Outbound Email to be able to force the email modification.
However, mail sending works perfectly with :
- WP Mail SMTP plugin (contact forms configured through it, and test mails)
- WP Test Email plugin (a plugin dedicated to sending mails in order to test configuration)
- PHP
mail()
function - Shell mailx command (e.g.
echo "Message content" | mailx -s "Message subject" [email protected]
)
There is no related information in access logs, and no output in error logs.
If it may help, wordpress is installed on a VPS which is also a mail server I manually installed and configured with Postfix & Dovecot. SPF, DKIM, and DMARC are also correctly configured and tested using external services that allow to verify all of those configurations. All tests passed.
When I try to change admin mail, even if wordpress tells me that an email has been sent in order to validate the new email address, my postfix logs remain empty, whereas all of the working tests generate lot of postfix logs.
My wordpress admin area does not seem to be able to send mails. For an example, I tried to change the admin mail address, but I never received the confirmation mail and had to use the plugin Change Admin Email Setting Without Outbound Email to be able to force the email modification.
However, mail sending works perfectly with :
- WP Mail SMTP plugin (contact forms configured through it, and test mails)
- WP Test Email plugin (a plugin dedicated to sending mails in order to test configuration)
- PHP
mail()
function - Shell mailx command (e.g.
echo "Message content" | mailx -s "Message subject" [email protected]
)
There is no related information in access logs, and no output in error logs.
If it may help, wordpress is installed on a VPS which is also a mail server I manually installed and configured with Postfix & Dovecot. SPF, DKIM, and DMARC are also correctly configured and tested using external services that allow to verify all of those configurations. All tests passed.
When I try to change admin mail, even if wordpress tells me that an email has been sent in order to validate the new email address, my postfix logs remain empty, whereas all of the working tests generate lot of postfix logs.
Share Improve this question asked Jul 20, 2024 at 15:37 John KraviczJohn Kravicz 111 bronze badge1 Answer
Reset to default 1I found the issue, had to edit /etc/php/8.3/cli/php.ini
file, by adding/editing following lines :
[mail function]
; For Win32 only.
; https://php.net/smtp
#SMTP = localhost
SMTP = mysmtpserver.domain
; https://php.net/smtp-port
smtp_port = 25
username = myusername
password = mypassword
sendmail_from = [email protected]
Then a service nginx restart
.
I still don't understand why PHP is able to send mails through mail()
function, but Wordpress need the php.ini file to be configured...
Anyway, hope this helps !
本文标签:
版权声明:本文标题:Wordpress admin area not sending mail (but works with WP Mail SMTP, Test Mail, and PHP mail() function) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300310a1930769.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论