Closed terrablue closed 1 month ago
In a store file, say stores/Mailchimp.js:
stores/Mailchimp.js
import mail from "@primate/mail"; import env from "rcompat/env"; export default mail({ provider: "mailchimp", secret: env.MAILCHIMP_API_KEY, options: { server: env.MAILCHIMP_SERVER_PREFIX, }, });
Then in a route, say routes/register.js:
routes/register.js
export default { post(request) { // Handle registration /* ... */ // send email request.store.Mailchimp.send(user.email, { ... }); }, });
should add Mailgun and SendGrid too. that's the one I use.
https://github.com/primatejs/primate/issues/165
In a store file, say
stores/Mailchimp.js
:Then in a route, say
routes/register.js
: