Mercurial > p > roundup > code
comparison roundup/mailer.py @ 4116:391fa482f995
fix TLS handling with some SMTP servers (issues 2484879 and 1912923)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 17 Mar 2009 23:14:50 +0000 |
| parents | da682f38bad3 |
| children | d5cd6f440396 4498f5252f8b |
comparison
equal
deleted
inserted
replaced
| 4115:d61066deae67 | 4116:391fa482f995 |
|---|---|
| 212 smtplib.SMTP.__init__(self, config.MAILHOST, port=config['MAIL_PORT'], | 212 smtplib.SMTP.__init__(self, config.MAILHOST, port=config['MAIL_PORT'], |
| 213 local_hostname=config['MAIL_LOCAL_HOSTNAME']) | 213 local_hostname=config['MAIL_LOCAL_HOSTNAME']) |
| 214 | 214 |
| 215 # start the TLS if requested | 215 # start the TLS if requested |
| 216 if config["MAIL_TLS"]: | 216 if config["MAIL_TLS"]: |
| 217 self.ehlo() | |
| 217 self.starttls(config["MAIL_TLS_KEYFILE"], | 218 self.starttls(config["MAIL_TLS_KEYFILE"], |
| 218 config["MAIL_TLS_CERTFILE"]) | 219 config["MAIL_TLS_CERTFILE"]) |
| 219 | 220 |
| 220 # ok, now do we also need to log in? | 221 # ok, now do we also need to log in? |
| 221 mailuser = config["MAIL_USERNAME"] | 222 mailuser = config["MAIL_USERNAME"] |
