> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dart

# Dart Quickstart

Send your first email with the Mailofly Dart SDK.

**Requires:** Dart 3.0+ (Flutter compatible) · [API key](api-keys.md) · [Account key](sending-accounts.md)

***

## 1. Install

```bash theme={null}
dart pub add mailofly
```

***

## 2. Send an email

```dart theme={null}
import 'dart:io';
import 'package:mailofly/mailofly.dart';

void main() async {
  final client = Mailofly(apiKey: Platform.environment['MAILOFLY_API_KEY']!);

  final result = await client.emails.send(
    from: 'Acme <onboarding@example.com>',
    to: 'you@example.com',
    subject: 'Hello from Mailofly',
    html: '<p>It works!</p>',
  );

  print('Sent: ${result['id']}');
  client.close();
}
```

***

## 3. Check mail logs

```dart theme={null}
await client.mailLogs.list(page: 1, pageSize: 10);
```

Or open **[Emails](https://www.mailofly.com/user/emails)** in the app.

***

## Next

* [Dart SDK](../sdks/dart.md) — full reference
* [Sending examples](sending-examples.md)
* [API: Emails](https://docs.mailofly.com/api/emails)


## Related topics

- [Introduction](/api/index.md)
- [Http](/getting-started/http.md)
- [SDKs](/sdks/index.md)
- [Manage Emails](/sending/manage-emails.md)
