enough_mail 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 44

An IMAP and SMTP client for Dart developers.

Available under the commercial friendly MPL Mozilla Public License 2.0.

Usage #

A simple usage example:

import 'package:enough_mail/enough_mail.dart';

main() async {
  var client  = ImapClient(isLogEnabled: true);
  await client.connectToServer('imap.example.com', 993, isSecure: true);
  var loginResponse = await client.login('user.name', 'secret');
  if (loginResponse.isOkStatus) {
    var listResponse = await client.listMailboxes();
    if (listResponse.isOkStatus) {
      print('mailboxes: ${listResponse.result}');
    }
  }
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.0.1 #

  • Initial alpha version

example/enough_mail_example.dart

import 'package:enough_mail/enough_mail.dart';

void main() async {
  var client  = ImapClient(isLogEnabled: true);
  await client.connectToServer('imap.example.com', 993, isSecure: true);
  var loginResponse = await client.login('user.name', 'secret');
  if (loginResponse.isOkStatus) {
    var listResponse = await client.listMailboxes();
    if (listResponse.isOkStatus) {
      print('mailboxes: ${listResponse.result}');
    }
  }

}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  enough_mail: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:enough_mail/enough_mail.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
68
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Jul 5, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Health issues and suggestions

Fix lib/imap/imap_client.dart. (-100 points)

Analysis of lib/imap/imap_client.dart failed with 85 errors, including:

line 3 col 8: Target of URI doesn't exist: 'package:enough_mail/imap/Mailbox.dart'.

line 4 col 8: Target of URI doesn't exist: 'package:enough_mail/imap/Message.dart'.

line 5 col 8: Target of URI doesn't exist: 'package:enough_mail/imap/Response.dart'.

line 7 col 8: Target of URI doesn't exist: 'package:enough_mail/src/imap/Command.dart'.

line 73 col 3: Undefined class 'CommandTask'.

Fix lib/src/imap/list_parser.dart. (-99.99 points)

Analysis of lib/src/imap/list_parser.dart failed with 31 errors, including:

line 8 col 46: The name 'Mailbox' isn't a type so it can't be used as a type argument.

line 10 col 14: The name 'Mailbox' isn't a type so it can't be used as a type argument.

line 10 col 32: The name 'Mailbox' isn't a type so it can't be used as a type argument.

line 18 col 8: The name 'Mailbox' isn't a type so it can't be used as a type argument.

line 18 col 45: Undefined class 'Response'.

Fix lib/src/imap/fetch_parser.dart. (-99.58 points)

Analysis of lib/src/imap/fetch_parser.dart failed with 19 errors, 1 hint, including:

line 7 col 47: The name 'Message' isn't a type so it can't be used as a type argument.

line 8 col 14: The name 'Message' isn't a type so it can't be used as a type argument.

line 8 col 36: The name 'Message' isn't a type so it can't be used as a type argument.

line 11 col 8: The name 'Message' isn't a type so it can't be used as a type argument.

line 11 col 45: Undefined class 'Response'.

Fix additional 25 files with analysis or formatting issues. (-753.26 points)

Additional issues in the following files:

  • lib/src/imap/command.dart (8 errors, 1 hint)
  • lib/src/imap/noop_parser.dart (7 errors, 1 hint)
  • lib/src/imap/select_parser.dart (7 errors, 1 hint)
  • lib/src/imap/status_parser.dart (7 errors, 1 hint)
  • lib/imap/message.dart (6 errors)
  • lib/enough_mail.dart (5 errors)
  • lib/src/imap/logout_parser.dart (2 errors, 1 hint)
  • lib/src/imap/response_parser.dart (2 errors, 1 hint)
  • lib/src/imap/search_parser.dart (2 errors, 1 hint)
  • lib/smtp/smtp_client.dart (2 errors)
  • lib/src/imap/capability_parser.dart (2 errors)
  • lib/src/smtp/commands/smtp_sendmail_command.dart (1 error)
  • lib/imap/address.dart (Run dartfmt to format lib/imap/address.dart.)
  • lib/imap/mailbox.dart (Run dartfmt to format lib/imap/mailbox.dart.)
  • lib/imap/response.dart (Run dartfmt to format lib/imap/response.dart.)
  • lib/src/imap/all_parsers.dart (Run dartfmt to format lib/src/imap/all_parsers.dart.)
  • lib/src/imap/imap_response.dart (Run dartfmt to format lib/src/imap/imap_response.dart.)
  • lib/src/imap/imap_response_line.dart (Run dartfmt to format lib/src/imap/imap_response_line.dart.)
  • lib/src/imap/imap_response_reader.dart (Run dartfmt to format lib/src/imap/imap_response_reader.dart.)
  • lib/src/smtp/commands/all_commands.dart (Run dartfmt to format lib/src/smtp/commands/all_commands.dart.)
  • lib/src/smtp/commands/smtp_auth_command.dart (Run dartfmt to format lib/src/smtp/commands/smtp_auth_command.dart.)
  • lib/src/smtp/commands/smtp_ehlo_command.dart (Run dartfmt to format lib/src/smtp/commands/smtp_ehlo_command.dart.)
  • lib/src/smtp/commands/smtp_quit_command.dart (Run dartfmt to format lib/src/smtp/commands/smtp_quit_command.dart.)
  • lib/src/smtp/commands/smtp_starttls_command.dart (Run dartfmt to format lib/src/smtp/commands/smtp_starttls_command.dart.)
  • lib/util/stack_list.dart (Run dartfmt to format lib/util/stack_list.dart.)

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
event_bus ^1.1.0 1.1.1
Dev dependencies
pedantic ^1.8.0
test ^1.6.0