WordPress / Documentation-Issue-Tracker

Issue Tracker for the WordPress Documentation team.
https://make.wordpress.org/docs/
Other
82 stars 42 forks source link

Add system requirements for using wp_mail() #923

Open nisbet-hubbard opened 1 year ago

nisbet-hubbard commented 1 year ago

Issue Description

The doc on the requisite php.ini settings for wp_mail() is incomplete, doesn’t mention the need for a local SMTP server (fronted by sendmail binary) and doesn’t cover the case where a third-party SMTP server is used instead (e.g. through a plugin).

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/wp_mail

Section of Page with the issue

https://developer.wordpress.org/reference/functions/wp_mail/#notes

Why is this a problem?

The page is the main place where system requirements for sending emails through WP Core is documented. Whilst it’s relatively straightforward to configure a local SMTP server with proper authentication, the lack of any documentation on this has led a lot of advice columns on the internet to pronounce WP’s native mail functionality broken and recommend the use of third-party servers bridged by a plugin.

Suggested Fix

1) Correct the wording to reflect the fact that only Windows systems need additional configurations in php.ini.

2) Add info on the need for the presence of a sendmail binary on the system. Propose a corresponding entry in the Hosting Handbook.

3) Mention the fact that many SMTP plugins in the wild bypass this function in order to submit to an external mail server. This will make life easier for those who would like to switch to using a local mail server (e.g. for privacy reasons).

github-actions[bot] commented 1 year ago

Heads up @zzap - the "code reference" label was applied to this issue.