How to change the WordPress mail sender in 3 lines

Shortly: I needed to change the “sender” of all emails from a blog so every delivery error would have been sent to a specific mailbox. Without installing plugins, the three lines of code needed are:

They can be added in the theme functions.php  file for example, even if I wouldn’t add a blog wide behavior in a theme.

My excuses for my bad english but it's the only way I have to communicate with you. Would you suggest a correction? Leave a comment, thank you!

Leave a Reply