mailtm_client 1.1.1 mailtm_client: ^1.1.1 copied to clipboard
This package is a simple but complete mail.tm api wrapper, you can use this to save and manage your accounts, as well read all your temporary emails.
import 'dart:async';
import 'package:mailtm_client/mailtm_client.dart';
void main() async {
TMAccount account = await MailTm.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.name}'));
}
await subscription.cancel();
});
}