zytherdev/tzmail ? reverse-engineered prompt

Reverse engineered prompt

Build me a TypeScript email library for Node that makes it easy to create nice looking email templates and send them through a few different providers, like SMTP, SendGrid, Amazon SES, and Mailgun.

I want it to support ready made themes, simple validation, attachments, and a small cache so repeated templates are faster. It should work both as a one off instance for different services or tenants, and as a shared default setup if someone just wants to initialize it once. Please make sure it can send plain emails and template based emails, and that it can verify the connection before sending.

If it makes sense, also add an optional queued sending flow for background jobs with Redis, plus a way to expose basic Prometheus metrics for that queue. Keep it practical for transactional email, not a full campaign system. Use environment variables for credentials, and include a few clear examples for SMTP and one API based provider. If you need current docs for any provider or dependency, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab