// // Send confirmation email, set the content type to allow html by using this filter
add_filter( 'wp_mail_content_type', 'set_content_type' );
-
+ $site_name = get_bloginfo('name');
$to = $to_email;
$subject = 'Event Form Submission';
$message = $htmlMessage;
$userBody = $userMessage;
- $header[] = "From: ". bloginfo('name') . "<$fromEmail>";
+ $header[] = "From: $site_name <$fromEmail>";
$header[] = 'Reply-To:' . $adminEmail;
wp_mail($to, $subject, $message, $header);
// send a copy to the user submitting the email, using different headers and email template file
- $userHeader[] = "From: ". bloginfo('name') . "<$fromEmail>";
+ $userHeader[] = "From: $site_name <$fromEmail>";
$userHeader[] = 'Reply-To: No-Reply@gaslightmedia.com';
if(wp_mail($adminEmail, $subject, $userBody, $userHeader)){