Skip to content

Commit

Permalink
Merge pull request #277 from menkej/fix-227
Browse files Browse the repository at this point in the history
Fix 227
  • Loading branch information
menkej authored Jan 4, 2021
2 parents 5b58aa4 + 6b0215b commit 7b8fe2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- fix: smtp server_hostname cannot be an empty [#227](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/227)

## 1.7.1 (2020-11-15)

- fix: dev docker build on windows correctly manages crlf for scripts
Expand Down
4 changes: 3 additions & 1 deletion icloudpd/email_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ def send_2sa_notification(
from_addr = smtp_email if smtp_email else to_addr
logger = setup_logger()
logger.info("Sending 'two-step expired' notification via email...")
smtp = smtplib.SMTP()
smtp = smtplib.SMTP(smtp_host, smtp_port)
smtp.set_debuglevel(0)
# leaving explicit call of connect to not break unit tests, even though it is
# called implicitly via cunstructor parameters
smtp.connect(smtp_host, smtp_port)
if not smtp_no_tls:
smtp.starttls()
Expand Down

0 comments on commit 7b8fe2e

Please sign in to comment.