Next.js Discord

Discord Forum

Nodemailer gmail vs SES on sending email

Unanswered
Trigg Hound posted this in #help-forum
Open in Discord
Trigg HoundOP
Why I should use SES on sending email over using the nodemailer gmail and its completely free?
like what is the pros and cons for everyone?

Thanks in advance

3 Replies

@Trigg Hound Why I should use SES on sending email over using the nodemailer gmail and its completely free? like what is the pros and cons for everyone? Thanks in advance
The SES API exposes two methods to send mail – [SendEmail](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#sendEmail-property) and [SendRawEmail](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#sendRawEmail-property). While the first one is really easy to use and Nodemailer is not actually needed, then it is also quite basic in features. For example you can’t use attachments with SendEmail. On the other hand SendRawEmail requires you build your own MIME formatted email message which is far from being easy. And this is where Nodemailer steps in – it gives you a simple to use API while supporting even really complex scenarios like embedded images or calendar events.

In addition to the simple API, Nodemailer also provides rate limiting for SES out of the box. SES can tolerate short spikes but you can’t really flush all your emails at once and expect these to be delivered. To overcome this you can set a rate limiting value and let Nodemailer handle everything – if too many messages are being delivered then Nodemailer buffers these until there is an opportunity to do the actual delivery.. Take a look here: https://nodemailer.com/transports/ses/
@Trigg Hound solved?
Trigg HoundOP
Thank you @B33fb0n3 for the info. I'm new in SES so I'm just searching around to to learn more about it.