How to Send Email in Flutter using Resend?

Edwin
1 min readJul 11, 2023

--

Introduction

Learn how to send your first email using the Resend Dart SDK.

Prerequisites

To get the most out of this guide, you’ll need to:

1. Install

Get the Resend Dart SDK.

flutter pub add resend​

2. Usage

Import package:resend/resend.dart

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Resend(apiKey: "re_123456789");

return MaterialApp(
...
);
}
}

3. Create Instance of Resend

final resend = Resend.instance;

4. Send your first email

resend.sendEmail(
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
text: 'it works!',
);

5. Send email using HTML

resend.sendEmail(
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
html: '<strong>it works!</strong>',
);

Conclusion

In this article, I have explained the Use of Resend SDK for Flutter. You can change the code as you need.

I hope this blog post provides you with enough information on Sending email in Flutter for your projects.

Thank you for reading this article!

If you love the article, Clap 👏

Also follow me for more exciting articles related to dart and flutter.

If you found something wrong in the article, let me know! I would love to improve.

Let’s Get Connected

Find me on:
- Twitter
- IndiePage
- Youtube
- Github
- Linkedin

Support me: BuyMeACoffee

--

--

Edwin
Edwin

Written by Edwin

I am a passionate Developer, been working in IT field for more than 4 years. Currently Documenting my journey in Youtube: @ EdwinOslenTV

Responses (1)