enough_mail_discovery 1.0.3 copy "enough_mail_discovery: ^1.0.3" to clipboard
enough_mail_discovery: ^1.0.3 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);
    }
  }
}
3
likes
150
points
54
downloads

Documentation

API reference

Publisher

verified publisherenough.de

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

MPL-2.0 (license)

Dependencies

collection, http, json_annotation, universal_io, xml

More

Packages that depend on enough_mail_discovery