Brief journey of setting up graphql to send email using nodemailer and gmail

Jose KJ


Jose KJ
Used nodemailer package please checkout https://nodemailer.com/usage/
configured the follwoing in gmail the follwoing steps to successfully send email [copied from stackoverflow answer https://stackoverflow.com/a/73327545/19976827]
- Open Mail > Settings > See all Settings > Forwarding and POP/IMAP.
- Enable POP download: & Enable IMAP access: (then save the settings).
- Open Your Gmail Account > security > 2-step verification(enable it).
- Go to App Passwords > select device > select app(you can create any custom app).
- Copy App Password and use it in your application
just follow the node mailer sending mail doc, then add service, username, password, title, text, subject and then u are ready to send mails.... not that hard
other email services u can use are aws SES which has araound 62,000 emails per month if u call the from an ec2 instance.