Skip to content

slimpotatoboy/resend-dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resend dart

pub package

pub points

Dart library for the Resend API.

Platform Support

Android iOS MacOS Web Linux Windows

Setup

First, you need to get an API key, which is available in the Resend Dashboard.

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(
      ...
    );
  }
}

Create Instance of Resend

final resend = Resend.instance;

Usage

Send your first email:

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

Send email using HTML

Send an email custom HTML content:

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

Learn more

License

MIT License