Ticket #2697: smtplog.patch

File smtplog.patch, 0.6 kB (added by swl181, 10 months ago)
  • announcerplugin/distributors/email_distributor.py

    old new  
    273273    def _transmit(self, smtpfrom, addresses, message): 
    274274        smtp = smtplib.SMTP() 
    275275        smtp.connect(self.smtp_server) 
    276         smtp.login(self.smtp_user, self.smtp_password) 
     276        if self.smtp_user <> "": 
     277            smtp.login(self.smtp_user, self.smtp_password) 
    277278        smtp.sendmail(smtpfrom, addresses, message) 
    278279        smtp.quit() 
    279280