flutter_eml_parse 0.0.6 copy "flutter_eml_parse: ^0.0.6" to clipboard
flutter_eml_parse: ^0.0.6 copied to clipboard

A Flutter EML parser

This package is a port of eml-parse-js wich reads and parses email messages saved in (clear text) EML format. It also reads attachments from the saved message.

Features #

Parse and reads EML messages, with attachements.

Getting started #

Include this library in your Android or IOS flutter App. For encoding and decoding it uses the package charset_converter which only works in an app environment.

Usage #

See the example.

    String eml = await File('./sample.eml').readAsString();

    EmlParseResult result =  await parseEml(eml);

    
    print(result.from?.email);
    print(result.to?.email);
    print(result.subject);
    print(result.text);
    print(result.html);

    if (result.attachments != null && result.attachments!.isNotEmpty) {
      for (EmlEmailAttachment attachment in result.attachments!) {
        print(
            'Attachment: ${attachment.name} ${attachment.contentType} ${attachment.data.length}');
      }
    }

Additional information #

1
likes
120
pub points
55%
popularity

Publisher

unverified uploader

A Flutter EML parser

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

charset_converter, flutter, intl

More

Packages that depend on flutter_eml_parse