*/
public function sendHtmlEmail( $to, $subject, $htmlMessage )
{
-
+ // Set the From name using this wordpress hook.
+ add_filter( 'wp_mail_from_name', function ($name) { return $this->config['settings']['reg_org_name']; });
// Send confirmation email, set the content type to allow html by using this filter
add_filter( 'wp_mail_content_type', array( $this, 'set_content_type' ) );
$message = $htmlMessage;
- $header[] = 'From:' . $this->config['settings']['reg_org_namel'].' <'.$this->config['settings']['reg_org_from_email'].'>';
+ $header[] = 'From:' . $this->config['settings']['reg_org_name'].' <'.$this->config['settings']['reg_org_from_email'].'>';
$header[] = 'Reply-To:' . $this->config['settings']['reg_org_from_email'];
wp_mail( $to, $subject, $message, $header );
public function sendHtmlEmail($from, $to, $subject, $htmlMessage)
{
+ // Set the From name using this wordpress hook.
+ add_filter( 'wp_mail_from_name', function ($name) { return $this->config['settings']['reg_org_name']; });
// Send confirmation email, set the content type to allow html by using this filter
add_filter( 'wp_mail_content_type', array( $this, 'set_content_type' ) );