Skip to content

Commit

Permalink
fix: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Nov 30, 2024
1 parent 0209e7a commit e681760
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.0.2

## Docs

- Added propper docs in README.md

## 0.0.1

- Initial version.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
# 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](https://img.shields.io/pub/v/impaktfull_mailer.svg)](https://pub.dartlang.org/packages/impaktfull_mailer)

```
dependencies:
impaktfull_mailer: `latest_version`
```

### Send an email

```dart
/// 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: BracketVariableReplacer(), // 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,
);
```
1 change: 1 addition & 0 deletions bin/impaktfull_mailer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Future<void> main(List<String> arguments) async {
email: ImpaktfullMailerSecrets.brevoEmail,
password: ImpaktfullMailerSecrets.brevoPassword,
),
variableReplacer: BracketVariableReplacer(),
);
// Step 2: Create an html template
final template = OrderConfirmationMailTemplate(
Expand Down

0 comments on commit e681760

Please sign in to comment.