【发布时间】:2019-11-10 17:27:49
【问题描述】:
我一直在用 python 为 Thunderbird 撰写电子邮件,但我似乎无法设置回复字段。我已经尝试了以下几种变化。 这种方法我没有收到任何错误,它的组合很好,只是不会填写“回复”字段。
'''
def composeEmail():
import subprocess
tbirdPath = r'c:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe'
to = 'sendto@somewhere.com'
subject = 'This is my subject'
mBody = 'This is the contents'
replyTo = 'replies@somewhere.com'
body = ('<html><body><h1></h1>%s<br></body></html>' % mBody)
composeCommand = 'format=html,to={},reply-to={},subject={},body={}' .format(to, replyTo, subject, body)
subprocess.Popen([tbirdPath, '-compose', composeCommand])
composeEmail()
'''
【问题讨论】:
标签: python email thunderbird reply