def send_message(phone_number, identifying_code): ''' init MESSAGEXsend class ''' submail = MESSAGEXsend(MESSAGE_CONFIGS) ''' Optional para recipient cell phone number @Multi-para ''' submail.add_to(str(phone_number)) ''' Optional para set addressbook sign : Optional add addressbook contacts to Multi-Recipients @Multi-para ''' #submail.add_address_book('subscribe') ''' Required para set message project sign ''' submail.set_project('XWsWD4') ''' Optional para submail email text content filter @Multi-para ''' submail.add_var('code', str(identifying_code)) print submail.xsend()
def post(self): cellPhone = request.form['tos'] content = request.form['content'] submail = MESSAGEXsend(MESSAGE_CONFIGS) submail.add_to(cellPhone) submail.set_project("RIEdd4") submail.add_var('txt', content) return submail.xsend()
submail = MESSAGEXsend(MESSAGE_CONFIGS) ''' Optional para recipient cell phone number @Multi-para ''' submail.add_to('18616761881') ''' Optional para set addressbook sign : Optional add addressbook contacts to Multi-Recipients @Multi-para ''' #submail.add_address_book('subscribe') ''' Required para set message project sign ''' submail.set_project('kZ9Ky3') ''' Optional para submail email text content filter @Multi-para ''' submail.add_var('code','198276') print submail.xsend()