def check_requirements(self):
     """Logs in to SMTP server to check credentials and settings"""
     sms = SmsApi(self.smsapi_username, self.smsapi_password)
     try:
         total_points = sms.get_points()['points']
     except Exception as ex:
         _logger.error("Cannot connect to your SMSAPI account. "
                       "Correct your config and try again. Error details:")
         _logger.error(ex)
         raise
     _logger.info("SMSAPI connected. You have %s points." % total_points)
Example #2
0
 def check_requirements(self):
     """Log in to smsapi and check credentials and settings"""
     sms = SmsApi(self.smsapi_username, self.smsapi_password)
     try:
         total_points = sms.get_points()['points']
     except Exception as ex:
         _logger.error("Cannot connect to your SMSAPI account. "
                       "Correct your config and try again. Error details:")
         _logger.error(ex)
         raise
     _logger.info("SMSAPI connected. You have %s points." % total_points)
Example #3
0
from smsapi import SmsApi

def send_sms(phone, cod):
	username = "******"
    password = "******"
    sms = SmsApi(username, password)
    sms = sms.send_sms(recipient="48123456789",sender_name="SENDER", message="MESSAGE",eco=False,)
    print sms
 def notify(self, title, text, url=False):
     """Send email notification using SMTP"""
     body = text + ' - ' + url
     sms = SmsApi(self.smsapi_username, self.smsapi_password)
     sms.send_sms(body, recipient=self.smsapi_recipient)
     _logger.info("SMSAPI sent: [%s] %s" % (self.smsapi_recipient, body))
Example #5
0
from smsapi import SmsApi

apikey = "675031xxxxxxxxxxxx"
sender = "SEDEMO"

sms = SmsApi(apikey, sender)

# Send SMS message to 902000xxxx - fill sender field "SENDER" and message with "MESSAGE"
sms = sms.send_sms(recipient="91902000xxxx",
                   message="Hello, This is a test message from spring edge")
Example #6
0
 def notify(self, title, text, url=False):
     """Send sms notification using smsapi.pl"""
     body = text + ' - ' + url
     sms = SmsApi(self.smsapi_username, self.smsapi_password)
     sms.send_sms(body, recipient=self.smsapi_recipient)
     _logger.info("SMSAPI sent: [%s] %s" % (self.smsapi_recipient, body))