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.
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.
Works with
Packages commonly used together with enough_mail: ones it builds on, ones built on it, and its own family.
- cryptoenough_mail depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- xmlenough_mail depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- json_annotationenough_mail depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- intlenough_mail depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- synchronizedenough_mail depends on itLock mechanism to prevent concurrent access to asynchronous code.
- pointycastleenough_mail depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- basic_utilsenough_mail depends on itCommon utility classes for Strings, Dates, X509, PKCS, Cryptography and HTTP requests.
- encrypter_plusenough_mail depends on itHigh-level APIs over PointyCastle for two-way cryptography, supporting AES, RSA, Salsa20, and Fernet.