Setting different reply-to message in Python email/smtplib

Here's my take on it. I believe that the "Reply-To" header should be set explicitly. The likely reason is that it's less commonly used than headers such as "Subject", "To", and "From".

python
Python 2.6.6 (r266:84292, May 10 2011, 11:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> MAIL_SERVER = 'smtp.domain.example'
>>> TO_ADDRESS = '[email protected]'
>>> FROM_ADDRESS = '[email protected]'
>>> REPLY_TO_ADDRESS = '[email protected]'
>>> import smtplib
>>> import email.mime.multipart
>>> msg = email.mime.multipart.MIMEMultipart()
>>> msg['to'] = TO_ADDRESS
>>> msg['from'] = FROM_ADDRESS
>>> msg['subject'] = 'testing reply-to header'
>>> msg.add_header('reply-to', REPLY_TO_ADDRESS)
>>> server = smtplib.SMTP(MAIL_SERVER)
>>> server.sendmail(msg['from'], [msg['to']], msg.as_string())
{}

I had the same question and all I had to do to make it work was to set the header in lowercase like so:

msg['reply-to'] = "[email protected]"