How to Customize the From Email Address for the Save and Resume Addon

Introduction

Would you like to customize the from email address that the Save and Resume addon uses when sending the resume link? Using a small snippet, you can easily customize this email to be different from your WordPress admin email. In this tutorial, we’ll walk you through how to achieve this.

Creating the form

First, you’ll need to create a new form. We’re using one of the many helpful templates for our form. To learn more about WPForms templates, please have a look at this documentation.

begin by creating your form

If you need assistance in creating a form, you can always review this documentation.

Enabling the Save and Resume

Next, we’ll need to enable Save and Resume on the form. To do this, click on Settings from inside the form builder and toggle the switch for Enable Save and Resume. Once you’ve enabled this, you can proceed with configuring the settings and messages. For further assistance on the Save and Resume addon and setup, please review this documentation.

enable save and resume and configure the settings

Adding the snippet

Now it’s time to add the snippet to your site. If you need help with how and where to add snippets to your site, check out this tutorial.

/*
 * Customize the from email address that Save and Resume addon uses
 * 
 * @link https://wpforms.com/developers/how-to-customize-the-from-email-address-for-the-save-and-resume-addon/
 */

function save_resume_change_from_email( $from_address, $email ) {

	if ( $email->template instanceof WPFormsSaveResume\Email\Templates\SaveResume ) {
		
		// Change from address with Save and Resume email
		$from_address = '[email protected]'; 
		
	}
	
	return $from_address;
	
}
add_action( 'wpforms_emails_mailer_get_from_address', 'save_resume_change_from_email', 10, 2 );

You’ll need to change the $from_address to match the email address you want to set it to. And simply by adding this snippet, any email sent with the Save and Resume addon will appear to be from [email protected].

Please know that if you have the Force From Email checked while using the WP Mail SMTP plugin, this snippet will be ignored.

And that’s it! You’ve successfully used a snippet to customize the from email address. Would you like to also customize the reply-to email address? Check out our tutorial on How to Change the Reply-to Email for the Save and Resume Addon.