Ticket #3560: announcerplugin-actually-enable-tls.diff

File announcerplugin-actually-enable-tls.diff, 0.6 kB (added by leorochael, 5 months ago)

Patch to actually enable use_tls on AnnouncerPlugin

  • ./distributors/email_distributor.py

    old new  
    281281    def _transmit(self, smtpfrom, addresses, message): 
    282282        smtp = smtplib.SMTP() 
    283283        smtp.connect(self.smtp_server) 
     284        if self.use_tls: 
     285            smtp.ehlo() 
     286            smtp.starttls() 
    284287        if self.smtp_user: 
    285288            smtp.login(self.smtp_user, self.smtp_password) 
    286289        smtp.sendmail(smtpfrom, addresses, message)