Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Google Email fetch and OAuth token refresh service #9603

Merged
merged 10 commits into from
Jun 11, 2024

Conversation

scmmishra
Copy link
Member

@scmmishra scmmishra commented Jun 6, 2024

This PR adds the following changes

  1. Add Imap::GoogleFetchEmailService and Google::RefreshOauthTokenService. The Google::RefreshOauthTokenService uses OmniAuth::Strategies::GoogleOauth2 which is already added as a packge
  2. Update Inboxes::FetchImapEmailsJob to handle Google inboxes
  3. Add SMTP settings for Google in ConversationReplyMailerHelper to allow sending emails

Preview

Incoming emails

CleanShot 2024-06-06 at 17 17 22@2x

Outgoing email

CleanShot 2024-06-06 at 17 18 05@2x

Copy link

linear bot commented Jun 6, 2024

@scmmishra scmmishra requested a review from pranavrajs June 6, 2024 11:52
@scmmishra scmmishra marked this pull request as ready for review June 7, 2024 11:07
@scmmishra scmmishra temporarily deployed to chatwoot-pr-9603 June 7, 2024 11:10 Inactive
@scmmishra scmmishra force-pushed the feature/cw-3369-refresh branch from 7966a68 to 98f99cf Compare June 7, 2024 11:10
@scmmishra scmmishra temporarily deployed to chatwoot-pr-9603 June 7, 2024 11:11 Inactive
Copy link
Member

@muhsin-k muhsin-k left a comment

Choose a reason for hiding this comment

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

The staging environment was tested by sending several emails. Everything worked as expected.
CleanShot 2024-06-10 at 15 32 28

@scmmishra
Copy link
Member Author

@muhsin-k PTAL, spoke to @sojan-official the code looks good! We can get this merged

@muhsin-k muhsin-k self-requested a review June 11, 2024 06:45
@scmmishra scmmishra merged commit 650fee5 into develop Jun 11, 2024
15 of 16 checks passed
@scmmishra scmmishra deleted the feature/cw-3369-refresh branch June 11, 2024 08:52
Copy link

sentry-io bot commented Jun 18, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OAuth2::ConnectionError: Failed to open TCP connection to login.microsoftonline.com:443 (execution expired) (OAuth2::Conne... Sidekiq/Inboxes::FetchImapEmailsJob View Issue

Did you find this useful? React with a 👍 or 👎

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants