[Defender Pro] Defender notifications email address

I have WordPress setup to send outgoing mail through Sendgrid, which appears to work. However when Defender sends email notifications the from address that it is using is incorrect causing Sendgrid to not sign it correctly and thus for it to bounce.

Is there a way to set the from address for Defender notifications.

  • Nithin
    • Support Wizard

    Hi Matthew,

    Seems like you are using WPMU DEV Host, I suppose it’s related to the from email address noreply@wpmudev.host, which is the default address, as mentioned here:

    https://premium.wpmudev.org/docs/hosting/emails/

    What we recommend would be to use SMTP to change the “From” email address, but since you are already using Sendgrid. Sendgrid should already have an option to change the “From” address within their settings:

    https://premium.wpmudev.org/docs/hosting/emails/#from-and-reply-to-email-addresses

    Maybe you might find the following helpful:

    https://sendgrid.com/docs/ui/sending-email/senders/

    There isn’t any specific setting required in the Hosting side other than configuring in Sendgrid side. Would recommend double-checking the Sendgrid settings to ensure the “From” email is configured within their side correctly.

    If “noreply@wpmudev.host” isn’t the case, and still have issues then please do enable support access so that we could give a closer look.

    You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please let us know once you enable access so that we could check further.

    Kind Regards,

    Nithin

  • Matthew
    • Flash Drive

    It is not using “noreply@wpmudev.host”. I have set the From address in the Sendgrid plugin and it is also not using that (which would be fine). It is using the FQDN of the site as the sending domain, including www which is not configured to be a valid sending domain.

    I have granted access

  • Nithin
    • Support Wizard

    Hi Matthew,

    Thanks for enabling support access, on further testing in your system could notice the issue you have stated the email header seems to be using:

    noreply@domainURL

    I tested in my system with Gmail SMTP enabled, and I could get emails specific to Defender Pro when tested. Can confirm there aren’t any emails getting sent from your website side.

    Please try the following filters, and see whether it helps Sendgrid send the email:

    <?php

    function wpmudev_change_header() {
    return 'your-from-email-address';
    }

    add_filter('wd_scan_noreply_email','wpmudev_change_header');

    add_filter('wd_lockout_noreply_email', 'wpmudev_change_header');

    add_filter('wd_audit_noreply_email', 'wpmudev_change_header');

    Where you’ll have to edit the above line:

    return 'your-from-email-address';

    To the from Email Adress added in Sendgrid. That’s, for example, the above line would be:

    return 'abc@domainURL.com;

    You can implement the above code as a mu-plugins. Please check the following manual on how to create a mu-plugins:

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

    Once saved, please make sure to clear the Object cache, and then check whether you still have issues with receiving emails.

    Looking forward to your response on how that goes. Have a nice day ahead.

    Best Regards,

    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.