[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: post-commit hook

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 13 Dec 2016 06:09:05 +0000

João M. S. Silva wrote on Tue, Dec 13, 2016 at 00:14:56 +0000:
> >Didn't you ask this on IRC not long ago?
>
> Yes, but there was no answer. Now that you mention it, I suppose someone
> answered while my computer was sleeping/suspended and logged out from IRC?

Yes, someone left a reply on the channel bot for you to see the next
time you logged in.

> Here is my mailer.conf:
>
> $ grep -v ^# mailer.conf|grep -v ^$
> [general]
> smtp_hostname = smtp.gmail.com:587
> smtp_username = joao.m.santos.silva_at_gmail.com
> smtp_password = ????????????????
> smtp_use_ssl = true

"smtp_use_ssl" is not a mailer.py configuration knob.

Try this patch, after configuring port 465 in the .conf file:

Index: mailer.py
===================================================================
--- mailer.py (revision 1771121)
+++ mailer.py (working copy)
@@ -291,7 +291,7 @@ class SMTPOutput(MailedOutput):
     self.write(self.mail_headers(group, params))
 
   def finish(self):
- server = smtplib.SMTP(self.cfg.general.smtp_hostname)
+ server = smtplib.SMTP_SSL(self.cfg.general.smtp_hostname)
     if self.cfg.is_set('general.smtp_username'):
       server.login(self.cfg.general.smtp_username,
                    self.cfg.general.smtp_password)

It can't be committed as-is, but it might get your setup working.
(Modulo certificate verification defaults...)

https://docs.python.org/3/library/smtplib#smtplib.SMTP_SSL
Received on 2016-12-13 07:12:10 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.