[wp-trac] [WordPress Trac] #45359: Add checkbox to enable or disable sending out emails on password changes from backend

WordPress Trac noreply at wordpress.org
Thu Nov 15 20:29:19 UTC 2018


#45359: Add checkbox to enable or disable sending out emails on password changes
from backend
-------------------------+------------------------------
 Reporter:  atz          |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Users        |     Version:  4.9.8
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by BjornW):

 Hi @atz,

 I (maybe wrongfully) assume WordPress will not add a setting to
 enable/disable sending out emails, but I do have a possible solution to
 share which I often use myself.

 A possible solution while developing or debugging is using PHP's send_mail
 option in the PHP.ini. You can set it to use a shell script which can
 concatenate the outgoing mails into a logfile instead of sending them for
 real.

 Assuming you are using linux here's how to do this: ($ = your terminal
 prompt)

 - open a terminal
 - $ echo "cat >> /tmp/emails-sent.log" > /usr/local/bin/logmail
 - $ chmod +x /usr/local/bin/logmail
 - In your php.ini set: sendmail_path=/usr/local/bin/logmail

 Depending on your PHP and webserver settings you need to reload / restart
 them to make sure the sendmail_path has been updated correctly.

 This will concatenate all emails into one file found in /tmp and called
 emails-sent.log which can be tailed with the command-line application
 tail. Hope this helps.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45359#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list