How to send email using Gmail API (uses OAuth2 and nodemailer)
Вставка
- Опубліковано 4 лют 2025
- #gmail #oauth2 #nodemailer
In this video you will learn how to send #emails from the gmail #api using #nodemailer and #oauth2.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/g...
GitHub (Tutorial): github.com/tru...
FREE $100 credit @Digital Ocean: m.do.co/c/3208...
Subscribe: www.youtube.co...
Support the channel:
Paypal: www.paypal.me/...
Patreon: / trulymittal
---------------
Other useful Playlists
---------------
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
#API Authentication using #JWT: • NodeJS API Authenticat...
#Firebase: • Firebase | Build a Not...
Docker: • Docker
MongoDB: • Learn MongoDB in 50 mi...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
---------------
What I use
---------------
Mouse: amzn.to/2O9RJtu
Keyboard: amzn.to/2qxajCU
Keyboard 2: amzn.to/2XDWH4X
Monitor: amzn.to/2pDg7dH
Processor: amzn.to/347WWIb
RAM: amzn.to/2QEkUqw
Graphics: amzn.to/33aBrF4
Microphone: amzn.to/2DabdI9
#StayHome #WithMe #yoursTRULY #tutorial #howto #android
Refresh tokens may stop working after they are granted, either because:
The application has a status of 'Testing' and the consent screen is configured for an external user type, causing the token to expire in 7 days
With reference to Github page: github.com/googleapis/google-api-nodejs-client#readme
I came back for this reason, thank you
@yoursTRULY When i try to publish app, it says Verification not required. but still i'm getting the app not verified warning. What's the procedure to get a token that will not expire?
@@ashwinr001 have you solved the problem?
@@cumpaMira .. I think I have solved it,.. to prevent this,.. go to ur oauth consent screen and change the status from testing to in production by pressing on PUBLISH
@@samudramitra4900 did google verify your app because production status require verificcation
These type of videos are rare to find on the internet, focuses on real issue.
Glad you liked it
No wonder why UA-cam is considered the best university nowadays because there are so many great teachers here, and this channel is a good example. The explanation is very clean and easy to understand. What a great video.
Happy to help!
Spent many hours trying to navigate the google oauth setups and using ai, all to no avail. This is first explanation that worked! Many thanks!!!
This video is my life savior. I tried numerous methods but only this one works. Thank you so much!!
For anyone who receives 403 at 6:00 has to add gmail account to test users at project's OAuth consent screen.
mee too
Hero ♥
i was searching for this in the whole comments'
Thanks bro.
Literally i spent 8+ hours on this issue, finally i got solution because of you... Thank You
You have no idea how helpful this tutorial is for me. Thanks a lot.
I love it when a video like this saves me from jumping off a cliff!
This is an extremely detailed and well thought out video, well done man! Made it super easy to think about how to implement this into my website
Kudos for such a great tutorial. Very well explained, every minute detail covered. It worked in one-go.
Many many thanks.... Amazingly clear voice.... This coming from a Physics teacher who thinks he is very articulate himself.
I can't tell you that how much this video helped me. Thanks a lot. Keep it up!
hey man. Tks for this. It's save me in my work.
We used a web system with google cloud function send mail for clients, but, because new polices of google, are necessary Oauth, and break send mails in my site.
Thanks for shared your knowledge.
Persons equal you, make a better world.
sorry for my english.
;) dude, tell people to use environment variables in your tutorials, some people code without really thinking about it, thanks for the video
Yeah I agree too
Well yes, in my nodejs auth jwt series, I made that production ready, so we hv used env variables
Thank you friend you saved me hours and even days of googling and frustration 👍 great job
Thanks, man, this was well explained. You redefined "Do it yourself"
Thanks man! Have struggled with this for hours.
Thank you so much ! , you made it so easy for me ! Earned a new Subscriber
Thanks you very much, you save my day :D I forget to add client id and client secret before generate refresh token. Every documents absolute do not mention this step, so againt thanks you
Subscribe like share
good tutorial, helpful in 2024 for a small project
Those who are getting authorization error, add your email address in test users section then it will work as it should.
You saved my ass few hours of time :) Thank youuu
You good sir are a saint! Thank you!
Thank you❤️
where is that section?
Oauth consent section -> add test user
Inside google developer console
Worked like a charm! This is a great video on forwarding emails using Nodemailer through a gmail account! You covered everything
Thanks bro 😎
Thanks again for your support 😊
@@mafiacodes you literally saved me hours! Thank you!
thanks a lot for the detailed step by step tutorial, this has helped a lot
Great content man.Your videos are well detailed and easy to understand👏👏👏
This video was super helpful. Everything worked as expected. Thank you very much.
Best video everrrr!!! It worked like a charm! Thanks very, very much bro.
Awsome, congratulations, I was having problems to send email using nodemail, but this tutorial solved my problem, VERY USEFULL -THANKS ;-)
Glad to hear that
Wonderful work... very handy way to send custom mails..
Hey man thank you for ure job, very clear and helpful!
Glad to help!
Very helpful, great job bro ❤❤❤
Thank you so much for helping me out.
Thanks a fortune! I am finally out of the woods. This helped me a great deal.
Fantastic job.. voice is so clear.... do Paterons get access to the code you use on your youtubes? That would add even more value... Thank you for sharing you knowledge.
Thank you, my code is all public on GitHub, if someone really likes and wants to support - anyone (even you 😅) can support me on PayPal or patreon.
Great presentation. 👏🏻
Thx a lot, great tutorial it works perfectly ! ♥ greetings from Argentina !
Aguante Argentina vieja! No me importa nada
@@danpenia219 atr o no papu ? We
Error 403: access_denied The developer hasn't given you access to this app fix:
Solution:
1. Go to your developer console.
2. Go to OAuth consent screen.
3. Go to +Add users, under test users.
4. Add the users for the test (even the owner email address if not working without it)
I am facing same error with my login. What to. Please let me know???????
I ran into the same problem. Thank you so much
Thanks for the tip. Really help through this error
Thanks a lot. Really help through this error.
@Pazzo_Fredus. Thanks for the info, that helped me a lot! :)
Your video helped me alot! could you make one for interacting with google sheets?
This is awesome! Thank you for making this!
Subscribe like share
Very helpful video. Thank you so much for helping
thank you so much bro very easy to understand and works well
Worked! Thank you very much! keep posting.. how did you add those smileys in vscode?
Thanks, man! it worked very well, you made a really good job!
Man.. this tutorial helped me alot.
Thanks for tutorial. Which theme did you use?
snazzy operator
@@mafiacodes thanks
Who is here after google removed the less secure option on March 30th 2022?
If the app is in production mode, will the refresh token stop working, or will it work indefinitely?
Awesome explanation and good replier for any kind of issue related to the video
Thanks a bunch for the detailed video
can the from email be replaced with client email and to is our email, so it's not us who sends but the money client sends to us?
Awesome tutorial man, I appreciate videos like this that show exaclty what to do!
I do have a question, is there a limit to send emails in this way?
I don't know if there are any but u can use it like as if ur using gmail on the app, if u want to send marketing or transactional emails then I recommend using a mail service, have a look at this video: ua-cam.com/video/qFDgH6dHRA4/v-deo.html
@@mafiacodes Sweet, thanks again for your help
Subscribe like share
Awesome video with all needed steps. Thanks a lot , keep it up !!
thanks dude, you are a genius. You helped me a lot
Subscribe like share
Sir it's working fine for somedays,later it is not working......is there only to publish...or any other...! Thanks for great lecture sir..🙏🙏🙏
Watch as explained in this video for token expiration: ua-cam.com/video/c2b2yUNWFzI/v-deo.html
Subscribe Like Share
Thank you so much. I did with no error
Thanks for making this video love from developers India
Awesome tutorial. Thanks..
very clear explaination
Great tutorial! Thanks for the video.
Very nice video, thanks much friend :)
Thanks so much for the great tutorial!
Do I need to generate access token & refresh toked every time manually when it gets expired?
Thank you so much! This was exactly what I needed.
Subscribe like share
Why do we need this, can you tell the application of it.
ITS REALLY WORKED LOL THANK YOU DUDE
It works! Amazing! Thank you! Awesome tutorial!
Thank youuuuu so much .. it helps me a lot 🌸🌸😍
Hi, thanks for this tutorial, but this seems not to work in production environment, please do you have any idea how to work around it
Thank you very much, a query please, how would it be done in the case of a corporate email (with your own domain) to send emails with nodemailer with google workspace?
This works perfectly! Thanks......
Thank you very much, it was trully explained very well :)
Glad u like it
Congratulations! Very cool....
subscribe like share
Thank you! Saved my time!
much needed thanks a lot bro!
Happy to help
Awesome thank you bro
Thank You so much. It helped me a lot
Thank you so much. It worked in one go!!!
Funnily enough Co-Pilot created this exact same code (literally the exact code) when I used it in VS Code!! Co-incidence?
One more note for anyone encountering TLS/SSL issues when running this app using node. In windows, in the terminal you will need to disable cert checking by typing in the following:
SET NODE_TLS_REJECT_UNAUTHORIZED=0
thank you this was perfect 💯
this helped so much omg thabk tou so much!!
thank you man, this was really helpful
The problem is the token expire after some time and i need to repeat the process again to have nez token
Refresh tokens may stop working after they are granted, either because:
The application has a status of 'Testing' and the consent screen is configured for an external user type, causing the token to expire in 7 days
how to solve this issue ????
Publish ur application for verification
@@mafiacodes Will publishing the app for verification make it stop working for now?? I have it being used for a client's website. Thanks for the video btw.
@@mafiacodes How to do this?
@@mafiacodes sir how much time it will take to authorise?
Thanks a lot, man! You helped me a lot!
Thank you so much, you save me 👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼
excelent video
Thank you so much for your clean explication.
OMG why is this so complicated :( However this video is best!
😃 it is not, once you understand the OAuth part, its more explained in detail in this video ua-cam.com/video/c2b2yUNWFzI/v-deo.html
should the client id, client secret and refresh token be env variables?
This was excellent. Great job. Thank you.
nice video thanks bro !!1
awesome work keep up with the hard work thanks for the video it helped a lot
Great tutorial bro
Thanks It Worked !!! Subscribed
Nice Bhai thanks alot
Your video really help me alot
Awesome, I was looking for this
Thanks, this helped a lot
Great video! Just curious about that will the gmail access token be expired?
You can get that back from refresh token
That was an awesome tutorial
Can i use this method in production webapp
@@ericamelodecarvalho5714 hi mate i also need emails template for marketing so now im using sendgrid by twilio
So much help! Thank you for this :>
Thanks bro, made my day