From = $from; } } else { $dom_org = substr($phpmailer->From, strpos($phpmailer->From, '@') + 1); $dom_set = substr($from, strpos($from, '@') + 1); if ($dom_org != $dom_set) { $phpmailer->From = $from; } } if ($force_name) { if ($from_name == '') { return; } else { $phpmailer->FromName = $from_name; } } else { if ($phpmailer->FromName == '') { if ($from_name != '') { $phpmailer->FromName = $from_name; } else { $phpmailer->FromName = get_option('blogname'); } } } $phpmailer->Mailer = 'smtp'; $phpmailer->Host = $host; $phpmailer->SMTPAuth = true; $phpmailer->Port = $port; //$phpmailer->SMTPDebug = 1; $phpmailer->Username = $login; $phpmailer->Password = $password; $phpmailer->SMTPSecure = 'tls'; }