##// END OF EJS Templates
smtp: use 465 as default port for SMTPS...
FUJIWARA Katsunori -
r19050:601c1e22 default
parent child Browse files
Show More
@@ -1046,7 +1046,8 b' Configuration for extensions that need t'
1046 Host name of mail server, e.g. "mail.example.com".
1046 Host name of mail server, e.g. "mail.example.com".
1047
1047
1048 ``port``
1048 ``port``
1049 Optional. Port to connect to on mail server. Default: 25.
1049 Optional. Port to connect to on mail server. Default: 465 (if
1050 ``tls`` is smtps) or 25 (otherwise).
1050
1051
1051 ``tls``
1052 ``tls``
1052 Optional. Method to enable TLS when connecting to mail server: starttls,
1053 Optional. Method to enable TLS when connecting to mail server: starttls,
@@ -111,7 +111,11 b' def _smtp(ui):'
111 s = STARTTLS(sslkwargs, local_hostname=local_hostname)
111 s = STARTTLS(sslkwargs, local_hostname=local_hostname)
112 else:
112 else:
113 s = smtplib.SMTP(local_hostname=local_hostname)
113 s = smtplib.SMTP(local_hostname=local_hostname)
114 mailport = util.getport(ui.config('smtp', 'port', 25))
114 if smtps:
115 defaultport = 465
116 else:
117 defaultport = 25
118 mailport = util.getport(ui.config('smtp', 'port', defaultport))
115 ui.note(_('sending mail: smtp host %s, port %s\n') %
119 ui.note(_('sending mail: smtp host %s, port %s\n') %
116 (mailhost, mailport))
120 (mailhost, mailport))
117 s.connect(host=mailhost, port=mailport)
121 s.connect(host=mailhost, port=mailport)
General Comments 0
You need to be logged in to leave comments. Login now