ProSites Email Headers | How to Change Headers (from email)

I am using Mandrill to take on our email load, and it looks like ProSites is using the user’s admin email addresses to send email noticed, specifically the Expiration notice. This creates an email which is not signed and will not be sent to the user to alert them.

How can I alter this code in ProSites to use an arbitrary email instead of the administrative user’s email?

  • Milan
    • WordPress Wizard

    Helllo @jpowersfreelancing,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    You can use this code snippet to alter from email address. :slight_smile:

    add_filter('wp_mail_from', 'new_mail_from');
    add_filter('wp_mail_from_name', 'new_mail_from_name');

    function new_mail_from($old) {
    return 'admin@yourdomain.com';
    }
    function new_mail_from_name($old) {
    return 'Your Blog Name';
    }

    Just place this snippet in your active theme’s functions.php file or better it’s child theme’s functions.php file as parent theme update won’t preserve changes you made in its core files.

    One better approach I can think here for this snippet placement is “Mu-Plugins”. If you are not sure what is “mu-plugins” pleases go through this nice article and install above snippet as mu-plugin( create new php file for this snippet and place it inside /wp-content/mu-plugins/ directory ) .

    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Thanks for being with us.

    Cheers,

    Milan Savaliya

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.