使用python脚本从gmail发送短信 [英] send sms from gmail using python script
问题描述
我正在尝试使用python从gmail发送短信.我尝试了许多解决方案,但没有成功.我尝试使用libgmail,但似乎已弃用.甚至我也找不到如何从gmail发送短信到颌骨的地方,而实际上gmail却将免费短信发送到颌骨的地方.
I am trying to work for sending sms from gmail using python. I have tried many solutions but it didnt worked. I tried to use libgmail but seems to be deprecated. Even I am not able to find how to send sms from gmail to jawwal where as actually gmail sends free sms to jawwal.
我的代码是:
import libgmail
from TextMessaging import *
sender = Sender(<username>, <password>)
txtM = TextMessage(subject, body)
receiver = Receiver("<phone no>", "Jawwal")
sender.sendMessage(receiver, txtM)
在此情况下,在发送方,它会按预期的字符串或缓冲区给出错误
对于收信人,我不知道什么像
in this, on sender it gives error as expected string or buffer
and for reciever, i dont know whats carrier for jawwal like
CARRIERS = {"Alltel":"alltelmessage.com",
"ATT":"mobile.mycingular.com",
"Rogers":"pcs.rogers.com",
"Sprint":"messaging.sprintpcs.com",
"tMobile":"t-mobile.net",
"Telus":"msg.telus.com",
"Verizon":"vtext.com"}
请给我有关如何使用python脚本将短信发送到gmail的任何信息.
Kindly give me on any information how to send sms to gmail using python script.
谢谢
推荐答案
截至2014年4月1日,通过Gmail中的Google聊天向电话联系人发送短信是所有受支持的移动运营商均已停产."
"As of April 1, 2014, sending SMS messages to phone contacts through Google Chat in Gmail was discontinued for all supported mobile operators."
https://support.google.com/chat/answer/112176?hl = zh_CN
这篇关于使用python脚本从gmail发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!