-
Notifications
You must be signed in to change notification settings - Fork 26
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
MailChimp Replacement Backend #1080
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angelalalacheng I am trying to setup that was described in youtube video. To authorize the Api I am getting below attached error. Can you please suggest what wrong I am doing.
Hi, @vishnupriyaatheti The issue you’re facing is due to the fact that your application hasn’t completed the Google API verification process. When using Google APIs, such as the Gmail API, the app needs to go through a security and verification process by Google to ensure it complies with privacy and security standards. The error message “Access blocked: Gmail API tutorial has not completed the Google verification process” indicates that the app is still in testing and can only be accessed by developer-approved testers. The app is blocked from wider access because it hasn’t been fully verified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code was great, except that we need to reconsider the necessity of the queue system.
Asides from this, it somewhat a hassle to use Gmail as our email provider. I would suggest that we move to a real bulk mail sender other than Mailchimp to solve the issue.
logger.logInfo(`Email sent: ${JSON.stringify(result)}`); | ||
}; | ||
|
||
const processBatch = async (batch) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why do we need to set up an email queue system? If we are sending emails to a mass amount of users or just send to a list of users, we can just BCC it. And that would only cost one request to the email server.
Description
Related PRS (if any):
To test this backend PR you need to checkout #2595 frontend PR.
Main changes explained:
src/controllers/emailController.js
for refactoring and use content id to ensure that the image can display correctly in Gmailsrc/utilities/emailSender.js
for refactoring the codeBefore Testing
To send an email using the Gmail API with OAuth2 and nodemailer, follow the video below and set it up.
https://www.youtube.com/watch?v=-rcRf7yswfM&t=10s&ab_channel=MafiaCodes
Fill in the these variable values from the above setup in the .env file of the backend.
REACT_APP_EMAIL =
REACT_APP_EMAIL_CLIENT_ID =
REACT_APP_EMAIL_CLIENT_SECRET =
REACT_APP_EMAIL_REFRESH_TOKEN =
REACT_APP_EMAIL_CLIENT_REDIRECT_URI = https://developers.google.com/oauthplayground
sendEmail = true
How to test:
npm install
andnpm run dev
to run this PR locallyScreenshots or videos of changes:
See frontend
Note:
See frontend