10000 Call starttls() · python/webhook-mailer@d3f8296 · GitHub
[go: up one dir, main page]

Skip to content

Commit d3f8296

Browse files
committed
Call starttls()
1 parent bc416dd commit d3f8296

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mailer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def fetch_diff(client, url):
8181
async def send_email(smtp, message):
8282
async with smtp as server:
8383
await server.connect()
84-
print('Login:', SMTP_USERNAME, SMTP_PASSWORD)
84+
await server.starttls()
8585
await server.login(SMTP_USERNAME, SMTP_PASSWORD)
8686
return (await server.send_message(message))
8787

@@ -141,6 +141,5 @@ def application(loop, smtp):
141141
if __name__ == '__main__':
142142
loop = asyncio.get_event_loop()
143143
smtp = aiosmtplib.SMTP(hostname=SMTP_HOSTNAME, port=SMTP_PORT, loop=loop, use_tls=False)
144-
print('SMTP:', SMTP_HOSTNAME, SMTP_PORT)
145144
app = application(loop, smtp)
146145
aiohttp.web.run_app(app, port=PORT)

0 commit comments

Comments
 (0)
0