Skip to content

Commit

Permalink
Update the send_email function
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosribas committed May 10, 2024
1 parent 2537683 commit 91e6a13
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ async def fetch_status(job_id: str) -> PlainTextResponse:

async def send_email(email_address: str, job_id: str, status: str, tblout: str):
sender_email = os.getenv("EMAIL")
password = os.getenv("PASSWORD")
server = os.getenv("SERVER")
port = os.getenv("PORT")

Expand All @@ -123,7 +122,6 @@ async def send_email(email_address: str, job_id: str, status: str, tblout: str):
msg.attach(MIMEText(body, "plain"))

async with aiosmtplib.SMTP(hostname=server, port=port) as smtp:
await smtp.login(sender_email, password)
await smtp.send_message(msg)


Expand Down

0 comments on commit 91e6a13

Please sign in to comment.