柳树舒展开了黄绿嫩叶的枝条,在微微的春风中轻柔地拂动,就像一群群身着绿装的仙女在翩翩起舞。夹在柳树中间的桃树也开出了鲜艳的花朵,绿的柳,红的花,真是美极了!
通过PyFetion可以很方便的使用python来用飞信发送短信,下面贴出代码:
from fetion import *import osdef 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 Truemsg = "hello world"
SendSMS(msg)
print 'OK!!!'
有时会提醒你输入验证码,验证码就在PyFetion生成的一个图片中,查看图片然后输入验证码就ok了.
PyFetion项目主页:https://code.google.com/p/pytool/
本文python使用PyFetion来发送短信的例子到此结束。路灯经过一夜的努力,才无愧地领受第一缕晨光的抚慰。小编再次感谢大家对我们的支持!