Signed-off-by: bugwz <xbugwz@gmail.com>
Configuration
-------------
-To configure SMTP, all of the following config options must be set::
+To configure SMTP, all of the following config options must be set
+(When setting ``mgr/alerts/smtp_destination``, you can use commas to separate multiple)::
ceph config set mgr mgr/alerts/smtp_host *<smtp-server>*
ceph config set mgr mgr/alerts/smtp_destination *<email-address-to-send-to>*
Option(
name='smtp_destination',
default='',
- desc='Email address to send alerts to',
+ desc='Email address to send alerts to, use commas to separate multiple',
runtime=True),
Option(
name='smtp_port',
server = smtplib.SMTP(self.smtp_host, self.smtp_port)
if self.smtp_password:
server.login(self.smtp_user, self.smtp_password)
- server.sendmail(self.smtp_sender, self.smtp_destination, message)
+ server.sendmail(self.smtp_sender, self.smtp_destination.split(','), message)
server.quit()
except Exception as e:
return {