Estimated reading time: 2 minutes


  1. Introduction
  2. Example
  3. Usage


This package is a simple but complete api wrapper, you can use this to save and manage your accounts, as well read all your temporary emails.


See in the example folder



A static class which is mainly needed for storing, creating and loading accounts

Gettings the available domains

To get the available domains use


Create an account

To create an account you just need to use the MailTm.register method.


  • username: address' username (, here, abcdqwerty is the username)
  • password: account's password
  • domain: address' domain, you can either get one from or, if not given, a random one will be provided.
  • randomStringLength: will be used to generate a random password and/or username if not provided (16 is the default length)
await MailTm.register(password: 'ah yes password');

Returns a Future<AuthenticatedUser> instance

Loading an account

You can load an account by using the MailTm.login method


  • id: Will be used to retrieve the account, ONLY IF it was already retireved using login/register
  • username: Address, only if id was not provided
  • password: Password, only if id was not provided

Returns a Future<AuthenticatedUser> instance


This class is the one that represents an authenticated account (Having both an account's password and jwt token)

There are many methods, thought, they are pretty simple:

  • messageFrom: Gets a message from its id
  • deleteMessage: Deletes a message
  • readMessage: Marks a message as read
  • unreadMessage: Marks a message as unread
  • messageSource: Gets a message's source ( for further clarifications)
  • downloadAttachment: Downloads an attachment as a list of bytes
  • delete: Deletes the underlying account
  • update: Updates the underlying account (e.g. its used quota)
  • messagesAt: Gets the messages from a certain page. Each page has 30 messages
  • allMessages: Gets every page from the messages list
  • messages: You can listen to this Stream to get every upcoming message


This package is a simple but complete api wrapper You can use this to save and manage your accounts, as well read all your temporary emails.