mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
When sending email alerts use CRLF for windows clients (#10563)
* When sending email alerts use CRLF for windows clients * Convert hard \r\n into line return in templates * there is no down really
This commit is contained in:
@@ -35,12 +35,10 @@ class Mail extends Transport
|
||||
|
||||
public function contactMail($obj)
|
||||
{
|
||||
if (empty($this->config['email'])) {
|
||||
$email = $obj['contacts'];
|
||||
} else {
|
||||
$email = $this->config['email'];
|
||||
}
|
||||
return send_mail($email, $obj['title'], $obj['msg'], (Config::get('email_html') == 'true') ? true : false);
|
||||
$email = $this->config['email'] ?? $obj['contacts'];
|
||||
$msg = preg_replace("/(?<!\r)\n/", "\r\n", $obj['msg']); // fix line returns for windows mail clients
|
||||
|
||||
return send_mail($email, $obj['title'], $msg, (Config::get('email_html') == 'true') ? true : false);
|
||||
}
|
||||
|
||||
public static function configTemplate()
|
||||
|
Reference in New Issue
Block a user