• Resolved mscott

    (@mscott)


    Where do you define or set the From header email address for the “Your Weekly WPForms Summary” email that is sent? It seems that WPForms is sending this from the admin email address to the admin email address. This fails SPF and DMARC if this is an off-server email address.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Amjad Ali

    (@amjadali688)

    Hi @mscott ,

    Thanks for reaching out!

    By default, the “Your Weekly WPForms Summary” emails are sent from the admin email to the same admin email. That’s why you’re seeing them come from and go to the same address.

    If you want to change the email address these summaries are sent to, you can do so with a small PHP snippet. We have a guide with the snippet here: https://wpforms.com/developers/change-the-default-email-for-weekly-email-summaries/

    Hope that helps!

    Thread Starter mscott

    (@mscott)

    Is this for changing the email address with which the Summary Email is sent FROM – or is this for changing the email address for which the Summary Email is sent TO.

    The wording of the guide makes it sound like it’s changing the email address the summary is sent TO.

    I’m wanting to change (or disputing the validity of) the email address for which the Summary Email is sent FROM.

    I don’t have an issue with the Summary Email being sent to the WordPress admin’s email address.

    It’s the fact that the Summary Email is sent FROM that same email address. And you often can’t do that.

    If the WordPress admin’s email address is a yahoo or gmail email address, those servers are going to reject a message sent from the same email address. Because the server hosting the WordPress site isn’t going to be authorized to send emails FROM yahoo or gmail (or a slew of other email address domain names).

    I can certainly understand that something has to be set by default – and I’m OK with it being the admin’s email address. BUT… the plugin configuration should have an easy to find setting where you can change this to something else. Or maybe default it to “noreply@%thedomainameofthewordpresssite.com”

    Plugin Support Amjad Ali

    (@amjadali688)

    Hi @mscott ,

    I understand that you want to change the “From” email address for the Weekly WPForms Summary emails. By default, there isn’t a setting to change it.

    However, you can change the “From” address for the summary emails by using the following code snippet:

    /**

     * This function runs right before the WPForms summary email is generated.

     * It adds a filter to change the default 'From' address.

     */

    function wpf_add_summary_from_address_filter() {

        add_filter( 'wpforms_emails_mailer_get_from_address', 'wpf_set_custom_summary_from_address' );

    }

    // Hook before the WPForms function runs (priority < 10).

    add_action( 'wpforms_email_summaries_cron', 'wpf_add_summary_from_address_filter', 5 );

    /**

     * This is the callback function that actually sets our desired 'From' address.

     *

     * @param string $from_address The original 'From' address.

     * @return string The new 'From' address.

     */

    function wpf_set_custom_summary_from_address( $from_address ) {

        // --> IMPORTANT: Change this to your desired sending email address.

        // This should be an address on your domain, e.g., '[email protected]'.

        return '[email protected]';

    }

    /**

     * This function runs after the WPForms summary email has been sent.

     * It removes our custom filter to ensure it doesn't affect any other emails.

     */

    function wpf_remove_summary_from_address_filter() {

        remove_filter( 'wpforms_emails_mailer_get_from_address', 'wpf_set_custom_summary_from_address' );

    }

    // Hook after the WPForms function has run (priority > 10).

    add_action( 'wpforms_email_summaries_cron', 'wpf_remove_summary_from_address_filter', 20 );

    This ensures the emails are sent from a valid address on your domain (like [email protected]) instead of the WordPress admin’s email.

    In case it helps, here’s our tutorial with the most common ways to add custom code like this.

    For the most beginner-friendly option in that tutorial, I’d recommend using the WPCode plugin.

    Hope that helps!

    Thread Starter mscott

    (@mscott)

    This would seem to be a woefully needed configuration option.

    I’m utterly shocked that more WPForms users haven’t run into this issue. And that there isn’t an easy to use configuration option to change this. Relying on code snippets isn’t something I would say comes easy to most users.

    Plugin Support Amjad Ali

    (@amjadali688)

    Hi @mscott ,

    Thanks so much for sharing your feedback!

    We understand that an easy configuration option would make things much simpler for users who aren’t familiar with code snippets.

    I’ve noted your suggestion and will pass it along to our internal team so it can be considered for future updates.

    Thank you for the suggestion!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Your Weekly WPForms Summary From address setting’ is closed to new replies.