Ticket #3160: localmail.3.patch

File localmail.3.patch, 0.7 kB (added by doki_pen, 7 months ago)

allow anonymous mail sending

  • trac-hacks/announcerplugin/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