Skip to content

Conversation

rkuo-danswer
Copy link
Contributor

Description

Fixes https://linear.app/danswer/issue/DAN-1929/emails-not-sending.

How Has This Been Tested?

Added by default skipped test that sent an email.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@rkuo-danswer rkuo-danswer marked this pull request as ready for review April 30, 2025 04:50
Copy link

vercel bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 6:37am

@rkuo-danswer rkuo-danswer requested a review from a team as a code owner April 30, 2025 04:50
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR adds SendGrid as an alternative email delivery service alongside SMTP, addressing an email sending issue while maintaining backward compatibility.

  • Added SendGrid integration in /backend/onyx/auth/email_utils.py with send_email_with_sendgrid() function for handling both HTML and plain text emails
  • Introduced SENDGRID_API_KEY configuration in /backend/onyx/configs/app_configs.py while preserving existing SMTP settings
  • Added new dependencies in /backend/requirements/default.txt: sendgrid (6.11.0), python-http-client (3.3.7), starkbank-ecdsa (2.2.0)
  • Created skipped test in /backend/tests/unit/onyx/auth/test_email.py to validate email functionality
  • Fixed typo in /backend/onyx/chat/process_message.py from response_sumary to response_summary

5 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile

@rkuo-danswer rkuo-danswer added this pull request to the merge queue Apr 30, 2025
Merged via the queue into main with commit e254fdc Apr 30, 2025
11 checks passed
@rkuo-danswer rkuo-danswer deleted the bugfix/send-email branch April 30, 2025 08:24
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* add sendgrid as option

* code review

* mypy

---------

Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants