Home / Admin / Customize the From Email Address for the Save and Resume Addon
Duplicate Snippet

Embed Snippet on Your Site

Customize the From Email Address for the Save and Resume Addon

This snippet will customize the from email address that the Save and Resume addon uses when sending the resume link.

<10
Code Preview
php
<?php
/**
Customize the from email address for the Save and Resume addon.
@param string $from_address The current from email address.
@param object $email        The email object.
@return string
 */
function wpf_save_resume_change_from_email( $from_address, $email ) {
 // Check if this is a Save and Resume email
 if ( property_exists( $email, 'template' ) && $email->template instanceof \WPForms\Emails\Templates\General ) {
 // Change from address for Save and Resume email
 $from_address = '[email protected]';
 }
 return $from_address;
}
add_filter( 'wpforms_emails_mailer_get_from_address', 'wpf_save_resume_change_from_email', 10, 2 );

Comments

Add a Comment