mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-08 10:26:50 +08:00
SMTP authentication is optional (#2765)
Co-authored-by: Laurent Magnien <laurent.magnien@adsn.fr>
This commit is contained in:
@@ -16,7 +16,8 @@ class SMTPClient:
|
||||
smtp = smtplib.SMTP(self.server, self.port)
|
||||
if self._use_tls:
|
||||
smtp.starttls()
|
||||
smtp.login(self.username, self.password)
|
||||
if (self.username):
|
||||
smtp.login(self.username, self.password)
|
||||
msg = MIMEMultipart()
|
||||
msg['Subject'] = mail['subject']
|
||||
msg['From'] = self._from
|
||||
|
||||
Reference in New Issue
Block a user