smtp 1.0.0+1 copy "smtp: ^1.0.0+1" to clipboard
smtp: ^1.0.0+1 copied to clipboard

An SMTP 5321 server implementation in Dart. Use this to receive e-mail messages within the Dart VM.

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!');
  }
}
0
likes
30
pub points
55%
popularity

Publisher

unverified uploader

An SMTP 5321 server implementation in Dart. Use this to receive e-mail messages within the Dart VM.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

async, dart2_constant, http_parser, mime

More

Packages that depend on smtp