Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def send_message(src,dest, string):
parts, encoding_flag, msg_type_flag = smpplib.gsm.make_parts(string)
logging.info('Sending SMS "%s" to %s' % (string, dest))
for part in parts:
pdu = client.send_message(
source_addr_ton=smpplib.consts.SMPP_TON_INTL,
source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
source_addr=src,
dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
destination_addr=dest,
short_message=part,
data_coding=encoding_flag,
esm_class=msg_type_flag,
registered_delivery=False,
)
def send_message(src,dest, string):
parts, encoding_flag, msg_type_flag = smpplib.gsm.make_parts(string)
logging.info('Sending SMS "%s" to %s' % (string, dest))
for part in parts:
pdu = client.send_message(
source_addr_ton=smpplib.consts.SMPP_TON_INTL,
source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
source_addr=src,
dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
destination_addr=dest,
short_message=part,
data_coding=encoding_flag,
esm_class=msg_type_flag,
registered_delivery=False,
)