mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Merge pull request #3221 from ekoyle/add_web_html_email_option
Add web config option for HTML emails
This commit is contained in:
commit
57339c4221
@ -178,6 +178,7 @@ $config['email_backend'] = 'mail'; // Mail backe
|
||||
$config['email_from'] = NULL; // Mail from. Default: "ProjectName" <projectid@`hostname`>
|
||||
$config['email_user'] = $config['project_id'];
|
||||
$config['email_sendmail_path'] = '/usr/sbin/sendmail'; // The location of the sendmail program.
|
||||
$config['email_html'] = FALSE; // Whether to send HTML email as opposed to plaintext
|
||||
$config['email_smtp_host'] = 'localhost'; // Outgoing SMTP server name.
|
||||
$config['email_smtp_port'] = 25; // The port to connect.
|
||||
$config['email_smtp_timeout'] = 10; // SMTP connection timeout in seconds.
|
||||
|
@ -248,6 +248,10 @@ $mail_conf = array(
|
||||
'descr' => 'From email address',
|
||||
'type' => 'text',
|
||||
),
|
||||
array('name' => 'email_html',
|
||||
'descr' => 'Use HTML emails',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
array('name' => 'email_sendmail_path',
|
||||
'descr' => 'Sendmail path',
|
||||
'type' => 'text',
|
||||
|
@ -21,4 +21,4 @@
|
||||
* @subpackage Alerts
|
||||
*/
|
||||
|
||||
return send_mail($obj['contacts'], $obj['title'], $obj['msg'], $opts['html'] ? true : false );
|
||||
return send_mail($obj['contacts'], $obj['title'], $obj['msg'], ($config['email_html'] == 'true') ? true : false );
|
||||
|
1
sql-schema/108.sql
Normal file
1
sql-schema/108.sql
Normal file
@ -0,0 +1 @@
|
||||
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('email_html', 'false', 'false', 'Send HTML emails', 'alerting',0,'general',0,'0','0');
|
Loading…
Reference in New Issue
Block a user