Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

compose Thunderbird with specified reply-to in python

$
0
0

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

'''


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>