Posted in Python onApril 22, 2014
通过PyFetion可以很方便的使用python来用飞信发送短信,下面贴出代码:
from fetion import *import os def SendSMS(sms): myphone = 'xxxxxx' mypwd = 'oooooooooo' tophone = 'oxoxoxoxoxox' fetion = PyFetion(myphone,mypwd,'TCP') fetion.login(FetionHidden) print 'send to '+tophone fetion.send_sms(sms,tophone,True) print 'OK' fetion.logout() return True msg = "hello world" SendSMS(msg) print 'OK!!!'
有时会提醒你输入验证码,验证码就在PyFetion生成的一个图片中,查看图片然后输入验证码就ok了.
PyFetion项目主页:https://code.google.com/p/pytool/
python使用PyFetion来发送短信的例子
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@