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.si...@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

Reply via email to