enough_mail_discovery 1.0.1 copy "enough_mail_discovery: ^1.0.1" to clipboard
enough_mail_discovery: ^1.0.1 copied to clipboard

Discover email server and their settings based on an email. Discover IMAP, POP, SMTP and related settings.

example/enough_mail_discovery_example.dart

import 'package:enough_mail_discovery/enough_mail_discovery.dart';

// ignore: avoid_void_async
void main() async {
  const email = 'someone@enough.de';
  final config = await Discover.discover(
    email,
    isLogEnabled: false,
    forceSslConnection: false,
    isWeb: false,
  );
  if (config == null) {
    print('Unable to discover settings for $email');
  } else {
    print('Settings for $email:');
    for (final provider in config.emailProviders!) {
      print('provider: ${provider.displayName}');
      print('provider-domains: ${provider.domains}');
      print('documentation-url: ${provider.documentationUrl}');
      print('Incoming:');
      provider.incomingServers?.forEach(print);
      print(provider.preferredIncomingServer);
      print('Outgoing:');
      provider.outgoingServers?.forEach(print);
      print(provider.preferredOutgoingServer);
    }
  }
}
2
likes
140
pub points
21%
popularity

Publisher

verified publisherenough.de

Discover email server and their settings based on an email. Discover IMAP, POP, SMTP and related settings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

basic_utils, collection, http, json_annotation, universal_io, xml

More

Packages that depend on enough_mail_discovery