flutter_coremail 0.1.2
flutter_coremail: ^0.1.2 copied to clipboard
Typed Coremail IMAP/SMTP configuration and mail client facade for Dart.
flutter_coremail #
Typed Coremail server configuration and an IMAP/SMTP mail-client facade for
Dart. It delegates protocol work to enough_mail
and keeps Coremail webmail/SSO endpoints outside the stable API.
Features #
- Immutable IMAP, SMTP, POP3, and Webmail endpoint configuration.
- Account model that accepts a normal or client-specific password.
- Mailbox listing and selection, message fetch/search, flags, move/delete, folder creation/deletion, and SMTP sending.
- An optional SSO boundary that lets an application own WebView cookies.
- Caller-defined Coremail server configuration for any compatible deployment.
Usage #
import 'package:flutter_coremail/flutter_coremail.dart';
final account = CoremailAccount(
username: 'user@example.com',
password: 'client-specific-password',
server: CoremailServerConfiguration(
imap: CoremailEndpoint(host: 'imap.example.com', port: 993),
smtp: CoremailEndpoint(host: 'smtp.example.com', port: 465),
),
);
final client = CoremailClient(account);
await client.connect();
final mailboxes = await client.listMailboxes();
await client.disconnect();
For another deployment, create CoremailServerConfiguration with the hosts,
ports, and TLS modes supplied by its administrator. Do not log or persist the
password supplied to CoremailAccount.
Scope and safety #
CoremailClient uses IMAP/SMTP and does not call Coremail's private Webmail
RPCs. Confirm sends and destructive actions in the host app before calling
them. Coremail deployments can differ, so test a deployment with a dedicated
account before production use.
Detailed Coremail interface notes are available in
doc/coremail-web-api.md; they describe a
deployment-neutral JSON-RPC and HTTP surface, not a stable public API contract.
Development #
dart analyze
dart test
dart pub publish --dry-run
The package is not affiliated with Coremail. See LICENSE.