Skip to content

Commit 75a3704

Browse files
committed
fix: simply use defaults for connecting
1 parent 7a2af14 commit 75a3704

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/vsc/utils/mail.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,8 @@ def _connect(self):
8787
8888
If provided, use authentication and TLS.
8989
"""
90-
if self.mail_host:
91-
logging.debug("Using %s as the mail host", self.mail_host)
92-
if self.mail_port:
93-
logging.debug("Using %d as the mail port", self.mail_port)
94-
s = smtplib.SMTP(host=self.mail_host, port=self.mail_port)
95-
else:
96-
s = smtplib.SMTP(host=self.mail_host)
97-
else:
98-
# use the system default
99-
logging.debug("Using the system default mail host and port")
100-
s = smtplib.SMTP()
90+
logging.debug("Using mail host %s, mail port %d", self.mail_host, self.mail_port)
91+
s = smtplib.SMTP(host=self.mail_host, port=self.mail_port)
10192

10293
if self.smtp_use_starttls:
10394
context = ssl.create_default_context()

0 commit comments

Comments
 (0)