我一直在用python为雷鸟编写电子邮件,但我似乎无法设置回复字段。我尝试了以下几种变体。我没有使用此方法的任何错误,它组成的很好,只是不会填写“回复”字段。
'''
def composeEmail():
import subprocess
tbirdPath = r'c:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe'
to = '[email protected]'
subject = 'This is my subject'
mBody = 'This is the contents'
replyTo = '[email protected]'
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()
'''
很遗憾,这是不可能的。您可能要提交一个错误here。目前仅这些参数可用:
https://hg.mozilla.org/comm-central/file/tip/mailnews/compose/src/nsMsgComposeService.cpp#l1356