Skip to content
pubscout

enough_mail

3.0.0, released 4 weeks ago by enough.de

IMAP, POP3, and SMTP email library with high and low-level APIs and MIME parsing.

$ flutter pub add enough_mail
Source repository

What it does

Provides high-level and low-level clients for IMAP, POP3, and SMTP email protocols along with MIME message parsing and generation capabilities. It includes email provider auto-discovery and character encoding support.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to connect an app to IMAP, POP3, or SMTP mail servers.
  • You need to parse or generate MIME email messages with attachments.
  • You want to auto-discover mail server settings based on an email address.

Skip it when

  • You are relying on a hosted backend like Firebase or Supabase for messaging.
  • You only need to open the device's default email client via mailto links without direct protocol handling.

Strengths

  • Comprehensive protocol support including many IMAP extensions and security features.
  • High-level and low-level APIs give flexibility depending on control needs.
  • Includes email provider auto-discovery functionality.

Weaknesses

  • Requires manual handling of network connections and mail server states.
  • Complex email handling can require deep understanding of mail RFC standards.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
10
import 'package:enough_mail/enough_mail.dart';

Future<void> main() async {
  final config = await Discover.discover('user@domain.com');
  if (config != null) {
    final account = MailAccount.fromDiscoveredSettings('account', 'user@domain.com', 'password', config);
    final mailClient = MailClient(account);
    await mailClient.connect();
    await mailClient.selectInbox();
    final messages = await mailClient.fetchMessages(count: 10);
    messages.forEach((m) => print(m.decodeSubject()));
  }
}

Alternatives

Packages that do the same job and could replace enough_mail.

  • github

    A high-level GitHub API Client Library for Dart and Flutter.

Works with

Packages commonly used together with enough_mail: ones it builds on, ones built on it, and its own family.