Example 1: Enter the full email address you want displayed.
/** ******** ******** ******** ******** ******** ********
* TITLE: Change admin e-mail to new users
* DESCRIPTION: enter the full email address you want displayed
*
* http://miloguide.com/filter-hooks/wp_mail_from/
*/
function email_filter_wp_mail_from($email){
return "daffy.duck@example.com";
}
add_filter("wp_mail_from", "email_filter_wp_mail_from");
Example 2: Similar to example #1 but more portable.
/** ******** ******** ******** ******** ******** ********
* TITLE: Change admin e-mail to new users
* DESCRIPTION: auto-detect the server so you only have to enter the front/from half of the email address, including the @ sign
*
* http://snipplr.com/view/77687/wordpress-change-admin-email-to-new-users/
* http://miloguide.com/filter-hooks/wp_mail_from_name/
* http://premium.wpmudev.org/blog/wordpress-email-settings/
*
*/
function admin_email_filter_wp_mail_from($email){
/* start of code lifted from wordpress core, at http://svn.automattic.com/wordpress/tags/3.4/wp-includes/pluggable.php */
$sitename = strtolower( $_SERVER['SERVER_NAME'] );
if ( substr( $sitename, 0, 4 ) == 'www.' ) {
$sitename = substr( $sitename, 4 );
}
/* end of code lifted from wordpress core */
$myfront = "whateverIwant@";
$myback = $sitename;
$myfrom = $myfront . $myback;
return $myfrom;
}
add_filter("wp_mail_from", "admin_email_filter_wp_mail_from");
WordPress API development with Postman or PAW
The Wordpress API [https://wordpress.org/plugins/acf-to-rest-api/] works well. Once you figure out how to send a REST request, you'll be jamming in no time....
Bitnami WordPress Cheatsheet for AWS Lightsail
I'm currently working on two WordPress websites that have been pre-configured by Bitnami within a Virtual Private Cloud. Below are a few select commands I use...
Subscribe to new posts
Processing your application
Please check your inbox and click the link to confirm your subscription
There was an error sending the email