You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use [bw_contact_form] shortcode in conjunction with easy-wp-smtp.
Explanation
The Easy WP SMTP plugin overrides the from email address (and optionally name) with its own value.
This means that the email sent using [bw_contact_form] does not contain the form submitter's email address. Obviously this information is needed in order to construct a reply.
Solution
Include the following code in functions.php
add_filter( 'bw_email_message', 'sgm_bw_email_message', 11, 2 );
/**
* Appends From email and contact name to the contact form message
*
* Needed since easy-wp-smtp overrides the From email address.
* Since we're in the 'bw_email_message' filter we expect bw_replace_fields to be available.
*
* @param string $message the email content
* @param array $fields array of name value pairs
* @return string updated message
*/
function sgm_bw_email_message( $message, $fields ) {
bw_trace2();
$extra_bits = bw_replace_fields( "<br />From: %from%<br />Name: %contact%", $fields );
$message .= $extra_bits;
return $message;
}
The text was updated successfully, but these errors were encountered:
Requirement
Use [bw_contact_form] shortcode in conjunction with easy-wp-smtp.
Explanation
The Easy WP SMTP plugin overrides the from email address (and optionally name) with its own value.
This means that the email sent using [bw_contact_form] does not contain the form submitter's email address. Obviously this information is needed in order to construct a reply.
Solution
Include the following code in
functions.php
The text was updated successfully, but these errors were encountered: