Show More
@@ -35,6 +35,9 | |||
|
35 | 35 | # [smtp] |
|
36 | 36 | # host = my_mail_host |
|
37 | 37 | # port = 1025 |
|
38 | # tls = yes # or omit if not needed | |
|
39 | # username = user # if SMTP authentication required | |
|
40 | # password = password # if SMTP authentication required - PLAINTEXT | |
|
38 | 41 | # |
|
39 | 42 | # To configure other defaults, add a section like this to your hgrc |
|
40 | 43 | # file: |
@@ -209,7 +212,14 def patchbomb(ui, repo, *revs, **opts): | |||
|
209 | 212 | s = smtplib.SMTP() |
|
210 | 213 | s.connect(host = ui.config('smtp', 'host', 'mail'), |
|
211 | 214 | port = int(ui.config('smtp', 'port', 25))) |
|
212 | ||
|
215 | if ui.configbool('smtp', 'tls'): | |
|
216 | s.ehlo() | |
|
217 | s.starttls() | |
|
218 | s.ehlo() | |
|
219 | username = ui.config('smtp', 'username') | |
|
220 | password = ui.config('smtp', 'password') | |
|
221 | if username and password: | |
|
222 | s.login(username, password) | |
|
213 | 223 | parent = None |
|
214 | 224 | tz = time.strftime('%z') |
|
215 | 225 | for m in msgs: |
General Comments 0
You need to be logged in to leave comments.
Login now