Mercurial > p > roundup > code
diff roundup/mailer.py @ 3878:6d14a3b4e295
allow admin to specify port and local hostname for SMTP connections
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Sun, 02 Sep 2007 05:54:46 +0000 |
| parents | 35811df7c783 |
| children | 82f462d9ad16 |
line wrap: on
line diff
--- a/roundup/mailer.py Sat Sep 01 16:30:11 2007 +0000 +++ b/roundup/mailer.py Sun Sep 02 05:54:46 2007 +0000 @@ -1,7 +1,7 @@ """Sending Roundup-specific mail over SMTP. """ __docformat__ = 'restructuredtext' -# $Id: mailer.py,v 1.18 2006-08-11 01:41:25 richard Exp $ +# $Id: mailer.py,v 1.19 2007-09-02 05:54:46 jpend Exp $ import time, quopri, os, socket, smtplib, re, sys, traceback @@ -190,8 +190,8 @@ ''' Open an SMTP connection to the mailhost specified in the config ''' def __init__(self, config): - - smtplib.SMTP.__init__(self, config.MAILHOST) + smtplib.SMTP.__init__(self, config.MAILHOST, port=config['MAIL_PORT'], + local_hostname=config['MAIL_LOCAL_HOSTNAME']) # start the TLS if requested if config["MAIL_TLS"]:
