Dart library for the Resend API.
| Android | iOS | MacOS | Web | Linux | Windows |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
First, you need to get an API key, which is available in the Resend Dashboard.
Import package:resend/resend.dart
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
Resend(apiKey: "re_123456789");
return MaterialApp(
...
);
}
}final resend = Resend.instance;Send your first email:
resend.sendEmail(
from: '[email protected]',
to: '[email protected]',
subject: 'hello world',
text: 'it works!',
);Send an email custom HTML content:
resend.sendEmail(
from: '[email protected]',
to: '[email protected]',
subject: 'hello world',
html: '<strong>it works!</strong>',
);MIT License