adding bloginfo function directly into the header array instead of passing a variable...
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 18 Jul 2017 18:58:20 +0000 (14:58 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 18 Jul 2017 18:58:20 +0000 (14:58 -0400)
be displaying the site name on its own

models/front/events/frontAdd.php

index 35a6183..3428b77 100644 (file)
@@ -664,20 +664,20 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
 //                    // 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 = bloginfo('name');
+                    
                     $to      = $to_email;
                     $subject = 'Event Form Submission';
                     
                     $message = $htmlMessage;
                     $userBody = $userMessage;
 
-                    $header[] = "From: $site_name <$fromEmail>";
+                    $header[] = "From: ". bloginfo('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: $site_name <$fromEmail>";
+                    $userHeader[] = "From: ". bloginfo('name') . "<$fromEmail>";
                     $userHeader[] = 'Reply-To: No-Reply@gaslightmedia.com';  
                     
                     if(wp_mail($adminEmail, $subject, $userBody, $userHeader)){