def send(self, sender, receiver, message):
"""Send SMS Notification via Twilio."""
try:
Log.info("Sending SMS notification.")
self.load_settings()
client = TWClient(self.twilio_acct_sid, self.twilio_auth_token)
message = client.messages.create(to=receiver, from_=sender, body=message)
Log.info("SMS notification sent: %s", message.sid)
except Exception as excpt:
Log.exception("Trying to send notificaton via SMS: %s.", excpt)
评论列表
文章目录