Skip to content

impaktfull/dart_impaktfull_mailer

Repository files navigation

impaktfull_mailer

A dart library for sending emails on backend with a template engine.

Disclaimer

impaktfull_mailer is still in unstable & untested. everything under <1.0.0 should not be used unless you want to test it

Setup

Add dependency to pubspec

pub package

dependencies:
  impaktfull_mailer: `latest_version`

Send an email

/// Create the mailer
final mailer = ImpaktfullMailer(
  mailSenderService: BrevoMailSenderService(
    email: 'your_brevo_smtp_email',
    password: 'your_brevo_smtp_password',
  ), // or any other mail sender service
  variableReplacer: DelimiterVariableReplacer(
    prefix: '{{', // default
    suffix: '}}', // default
  ), // default
  defaultLocale: 'en',// default
);
/// Create the template
final template = YourTemplate();
/// Send the email
await mailer.sendEmailTemplate(
  fromEmail: '[email protected]',
  to: ['[email protected]'],
  subject: 'Test from the impaktfull_mailer dart package',
  template: template,
);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published