Better-Notify for Remix
Send notifications from Remix loaders and actions. Better-Notify works in any server-side context — action handlers, resource routes, or background jobs triggered from your Remix app.
Why it fits
- Works in loaders, actions, and resource routes
- ESM-native — no import issues
- Deploy to any Remix-supported platform
- Use React Email for JSX templates
Example
app/routes/contact.tsx
import { mail } from '~/lib/notifications';
import type { ActionFunctionArgs } from '@remix-run/node';
export async function action({ request }: ActionFunctionArgs) {
const form = await request.formData();
await mail.contactForm.send({
to: 'support@example.com',
input: {
name: String(form.get('name')),
message: String(form.get('message')),
},
});
return { sent: true };
}