fix logic

This commit is contained in:
wh1te909 2023-12-28 00:50:24 +00:00
parent abfeafa026
commit 70b8f09ccb
1 changed files with 10 additions and 9 deletions

View File

@ -221,8 +221,9 @@ class CoreSettings(BaseAuditModel):
) )
server.send_message(msg) server.send_message(msg)
server.quit() server.quit()
if self.smtp_host == "smtp-relay.gmail.com" and not self.smtp_requires_auth: else:
# gmail smtp relay specific handling. # gmail smtp relay specific handling.
if self.smtp_host == "smtp-relay.gmail.com":
server.ehlo() server.ehlo()
server.starttls() server.starttls()
server.send_message(msg) server.send_message(msg)