1

I've been composing emails in python for thunderbird but I can't seem to set the reply-to field. I've tried the following with a few variations. I don't get any errors with this method, it composes just fine it just won't fill in the "reply-to" field.

'''

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()

'''

user4611642
  • 27
  • 1
  • 5

1 Answers1

1

Unfortunately, this is not possible. You may want to file a bug here. Only these parameters are available at the moment:

https://hg.mozilla.org/comm-central/file/tip/mailnews/compose/src/nsMsgComposeService.cpp#l1356

Tim P
  • 417
  • 6
  • 14