comparison MoinMoin/util/mail.py @ 380:f91064250ea7

cfg.mail_smarthost = 'server:port' support imported from: moin--main--1.5--patch-384
author Thomas Waldmann <tw@waldmann-edv.de>
date Mon, 16 Jan 2006 00:46:43 +0000
parents d1333236adba
children 50c7a0cc1791
comparison
equal deleted inserted replaced
379:7034d570abeb 380:f91064250ea7
94 msg['Return-Path'] = address 94 msg['Return-Path'] = address
95 95
96 # Send the message 96 # Send the message
97 if not cfg.mail_sendmail: 97 if not cfg.mail_sendmail:
98 try: 98 try:
99 server = smtplib.SMTP(cfg.mail_smarthost) 99 host, port = (cfg.mail_smarthost + ':25').split(':')[:2]
100 server = smtplib.SMTP(host, int(port))
100 try: 101 try:
101 #server.set_debuglevel(1) 102 #server.set_debuglevel(1)
102 if cfg.mail_login: 103 if cfg.mail_login:
103 user, pwd = cfg.mail_login.split() 104 user, pwd = cfg.mail_login.split()
104 try: # try to do tls 105 try: # try to do tls