Exemplo n.º 1
0
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()
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
'''
Submail message/xsend API demo
SUBMAIL SDK Version 1.0.1 --python
copyright 2011 - 2014 SUBMAIL
'''
from message_xsend import MESSAGEXsend
from app_configs import MESSAGE_CONFIGS

'''
init MESSAGEXsend class
'''
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