mailgw_client 2.1.0 mailgw_client: ^2.1.0 copied to clipboard
This package is a simple but complete mail.gw api wrapper, you can use this to save and manage your accounts, as well read all your temporary emails.
import 'dart:async';
import 'package:mailgw_client/mailgw_client.dart';
void main() async {
GWAccount account = await MailGw.register();
print('Send a message to the following account: $account');
late StreamSubscription subscription;
subscription = account.messages.listen((e) async {
print('Listened to message with id: $e');
if (e.hasAttachments) {
print('Message has following attachments:');
e.attachments.forEach((a) => print('- $a'));
}
await subscription.cancel();
});
}