Skip to content

Commit

Permalink
Update mail.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nitchandak authored May 3, 2024
1 parent 3cd9a9e commit b42307e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gemini/sample-apps/agent-assist/backend/src/utils/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def send_email(self, to_mail, subject, body, file_path: Any = None) -> None:
with open(file_path, "rb") as fil:
part = MIMEApplication(fil.read(), Name=basename(file_path))
# After the file is closed
part[
"Content-Disposition"
] = f'attachment; filename="{basename(file_path)}"'
part["Content-Disposition"] = (
f'attachment; filename="{basename(file_path)}"'
)
msg.attach(part)

server = smtplib.SMTP("smtp.gmail.com", 587)
Expand Down

0 comments on commit b42307e

Please sign in to comment.