这里是原始帖子的链接:Why am I not able to send a Colon in a message but am able to send a Semicolon??? (Python, SMTP module) a为什么不在手机上显示此文本?
这与当时的冒号有关。我试着用不同的方式进行格式化,当时冒号使得手机上的文本显示为空白。这是我正在使用的短信功能的简单版本。这是一个威瑞森iPhone的SMTP,如果这有所作为。我可以使用分号,它会工作,但冒号不会:
import time
current = (str(time.strftime("%I:%M %p")))
print (current)
def Text():
import smtplib
ContentMatch = ("Content match, website checked at: ", current)
username = ("EmailUser")
password = ("Password1")
fromaddr = ("[email protected]")
toaddrs = ("[email protected]")
message = (str(ContentMatch))
# The actual mail send
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, message)
server.quit()
Text()
@paxdiablo没有我删除为原始。这是一个更简单的版本,因为其他人无法回答 – 2014-09-11 03:50:26
道歉,普雷斯顿,当时我看,原来还在那里,它看起来像这只是一些额外的信息,可以更好地添加到该原件。我已经取消了这个,对于麻烦抱歉。您可能希望将一些原始信息添加到该信息中,因为您上面给出的链接仅在特定级别的代表中可见。 – paxdiablo 2014-09-11 03:55:55