smtp 1.0.0+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new58

smtp

Pub build status

An SMTP 5321 server implementation in Dart.

Usage

This SMTP server should not be used as your front-facing server, especially in production. Consider setting up Postfix to relay e-mail to this server; that way, you can be sure that only well-formed e-mail messages will touch your Dart code.

Note that this includes no spam protection, etc., and is simply a plain SMTP server library.


main() async {
  var server = await SmtpServer.bind('127.0.0.1', 0);

  await for (var mailObject in server.mailObjects) {
    print(mailObject.envelope.originatorAddress);
    print(mailObject.envelope.headers.cc);
    mailObject.close(statusCode: 221, reasonPhrase: 'Bye!');
  }
}

1.0.0+1

  • Made the description longer for Pub (not sure why this knocked off an entire 20% from the score...).

1.0.0

  • First release.

example/main.dart

import 'package:smtp/smtp.dart';

main() async {
  var server = await SmtpServer.bind('127.0.0.1', 0);

  await for (var mailObject in server.mailObjects) {
    print(mailObject.envelope.originatorAddress);
    print(mailObject.envelope.headers.cc);
    mailObject.close(statusCode: 221, reasonPhrase: 'Bye!');
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  smtp: ^1.0.0+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:smtp/smtp.dart';
  
Version Uploaded Documentation Archive
1.0.0+1 Oct 5, 2018 Go to the documentation of smtp 1.0.0+1 Download smtp 1.0.0+1 archive
1.0.0 Oct 5, 2018 Go to the documentation of smtp 1.0.0 Download smtp 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
16
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: Flutter, other

Primary library: package:smtp/smtp.dart with components: io.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <3.0.0
async >=1.0.0 <3.0.0 2.0.8
dart2_constant ^1.0.0 1.0.2+dart2
http_parser ^3.0.0 3.1.3
mime ^0.9.0 0.9.6+2
Transitive dependencies
charcode 1.1.2
collection 1.14.11
meta 1.1.6
path 1.6.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
mailer ^1.0.0
test any