Hey, fams! today we are going to learn how to send e-mails, right from our IDE using NodeJS. The module of interest is called Nodemailer.
...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you so much.
But I am facing difficulty in attachment sending part, I have tried 3 times but couldn't send only text sent!
@Suchitra try adding an 's' to attachment:
attachments: [{
I ran into the same thing with just text showing up and checked the nodemailer documentation on attachements. That little mispelling fix should do the trick.
Also, if you want to learn how to do this with a React frontend and Google OAuth2, check out my nodemailer article as well :)
Thank you so much
It's working fine now:)
@Suchitra
Do you have a folder where your image is stored?
Example:
attachment: [{
filename: "robocop.jpg", path: "./img/robocop.jpg"}]
};
I kept image file in same folder where my index.js is present.
So in this case I just wrote:
attachment: [{
filename: "robocop.jpg", path: "robocop.jpg"}]
};
But it is not working:(
shouldn't it be
@xchavez94x i have not used sendgrid before but I will look into it too...thanks for your contribution
Good content...Thanks
@brandonwallace Thanks
Nice article! Thanks for posting it.
@Reaper thanks for the contribution
Or you could use mailer.reaper.im to avoid setting this up in your code and instead let it do all the lifting.
Parabens pelo conteĆŗdo.
obrigado muito apreciado
Kudos for teaching dotenv at the very beginning! I often see people pushing sensitive data into a public repo just because they treated environment security as an afterthought.
@njokdan You are welcome š
@mvoloskov Thanks for the contribution. It's always safety first.
@salarc123 ... Thanks for the compliment. I will write as requested.
Your mail will ended up in spam if you use google smtp.
What is the difference than using sendgrid package ?