Last updated:
0 purchases
flutter eml parse
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}');
}
}
copied to clipboard
Additional information #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.