Connect your application
mavimail speaks plain SMTP, so any framework or library that can send email can use it. You only change the mail settings of your development or test environment.
In four steps
Create an account and an inbox
Register, then create a project and an inbox in it. One inbox per application or environment keeps things apart.
Copy the SMTP credentials
Open the inbox. Its SMTP credentials and ready-made snippets for common frameworks are on the inbox page.
Enter them in your application
Replace the SMTP host, port, username and password in the configuration of your test environment. The settings are listed below.
Send a test message
Trigger any email in your application. It appears in the inbox within moments, without reloading the page.
SMTP settings
Username and password are different for every inbox. Treat them like any other secret and keep them out of your repository.
| Setting | Value |
|---|---|
| Host | smtp.mavimail.dev |
| Port | 2587, 2465, 2525 |
| Username | Shown on the inbox page |
| Password | Shown on the inbox page |
| Authentication | PLAIN or LOGIN |
Ports and encryption
All ports accept the same credentials. Use the port with required STARTTLS unless your setup cannot do TLS.
| Port | Encryption |
|---|---|
2587 | STARTTLS required before sign-in. Recommended. |
2465 | Implicit TLS from the first byte (SMTPS). |
2525 | STARTTLS optional. The only port that also accepts a sign-in without TLS – meant for local setups. |
Examples
Replace {username} and {password} with the values of your inbox. The app shows these snippets with your real credentials filled in, for more frameworks than listed here.
MAILER_DSN=smtp://{username}:{password}@smtp.mavimail.dev:2587?require_tls=trueMAIL_MAILER=smtp
MAIL_HOST=smtp.mavimail.dev
MAIL_PORT=2587
MAIL_USERNAME={username}
MAIL_PASSWORD={password}import nodemailer from 'nodemailer';
export const transport = nodemailer.createTransport({
host: 'smtp.mavimail.dev',
port: 2587,
secure: false,
requireTLS: true,
auth: { user: '{username}', pass: '{password}' },
});EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.mavimail.dev'
EMAIL_PORT = 2587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = '{username}'
EMAIL_HOST_PASSWORD = '{password}'swaks --server smtp.mavimail.dev:2587 --tls \
--auth-user '{username}' --auth-password '{password}' \
--from app@example.com --to customer@example.orgRead an inbox in your mail program
On paid plans you can read an inbox over IMAP in Apple Mail, Thunderbird, Outlook or on your phone. Switch on “IMAP access active” on the inbox page, tab “Mail client (IMAP)” – the username and the IMAP password are shown there. Automatic account setup does not find mavimail, so set up the account manually.
| Setting | Value |
|---|---|
| Incoming server | imap.mavimail.dev |
| Port | 2993 |
| Encryption | SSL/TLS |
| Username | Same as for SMTP, shown on the inbox page |
| Password | The IMAP password of the inbox, not the SMTP password |
Set up the account
- Apple Mail (Mac, iPhone, iPad)Add an account with “Other Mail Account” and enter a name, any email address (Mail only displays it) and the IMAP password. Choose IMAP, enter
imap.mavimail.devas incoming server and the username. If Mail does not ask for the port, set port2993with SSL/TLS afterwards in the server settings of the account (on iPhone and iPad under Advanced). - ThunderbirdCreate a new email account with a name, any address and the IMAP password, then choose “Configure manually”. Incoming server: IMAP,
imap.mavimail.dev, port2993, SSL/TLS, normal password and the username of the inbox. - OutlookAdd an account, enter any address and pick IMAP in the advanced or manual setup. Incoming mail: server
imap.mavimail.dev, port2993, encryption SSL/TLS, then the username and the IMAP password. The new Outlook, classic Outlook and Outlook for Mac ask for the same fields. - Other programs and AndroidChoose IMAP with manual setup and enter server
imap.mavimail.dev, port2993, SSL/TLS, the username and the IMAP password.
Good to know
- No outgoing server needed
- The account is only for reading; your application keeps delivering over SMTP. If the program insists on an outgoing server, enter
smtp.mavimail.devwith the SMTP credentials of the inbox – messages sent that way land in the inbox, never with real recipients. - Two folders
INBOXholds the messages,Trashis the trash of the inbox (many programs show it under their own name). Further folders cannot be created.- Deleting moves to the trash
- Deleting a message in the mail program moves it to the trash, as in the app, where it stays for 7 days. Deleting it in
Trashor emptying the trash removes it for good; moving it back toINBOXrestores it. Read and unread stay in sync both ways. - iPhone and iPad
- iOS does not keep the connection open in the background: new messages appear when you open Mail or it fetches new data. On the Mac, in Thunderbird and in Outlook they show up within seconds.
- Port blocked
- Some company networks only allow standard ports. If the program cannot reach port
2993, try another network. - Sign-in fails
- Check that IMAP access is switched on for the inbox and included in your plan, and use the IMAP password, not the SMTP password. After a new IMAP password or new SMTP credentials, sign in again with the current data.
Forwarding to real inboxes
Sometimes a test message has to reach a real mailbox, for example to check it in a mail client. mavimail forwards only to addresses and domains your organization has confirmed. Owners and admins manage targets in the organization settings and rules in the settings of each inbox.
- Confirm an address
- Add the address as a target. mavimail sends a confirmation link to it, valid for 72 hours. Nothing is forwarded until someone opens the link and confirms.
- Confirm a domain
- Add the domain and create the TXT record
_mavimail-verify.<domain>with the value shown in the settings, then check it. A confirmed domain covers the addresses directly at that domain, not its subdomains. - Forward by hand or by rule
- Forward a single message from the message view, or set up rules per inbox. A rule can match a recipient pattern such as
*@example.organd sends to at most 10 recipients per message. - What the forwarded message looks like
- The body stays as it is.
Frombecomes"<sender> via mavimail"with the mavimail forwarding address,Reply-Tois the original sender, andX-Mavimail-Original-FromandX-Mavimail-Forwardedshow where it came from. - Limits
- Every recipient counts against the forwards per month of your plan, also for rules. Failed deliveries are not credited back. The numbers per plan are on the pricing page.
- Confirmations expire
- A confirmed address stays valid for 12 months; 14 days before, mavimail sends a new confirmation link. Domains are checked every 30 days – if the TXT record is missing twice, the domain has to be confirmed again.
503Forwarding is turned off- The operator can switch forwarding off as a whole. Setting up targets and rules and forwarding then return this error; your existing targets and rules stay.
Trash
Deleted messages are not gone at once: they stay in the trash of their inbox for 7 days.
- Deleting moves to the trash
- Deleting a message or emptying an inbox – in the app or with
DELETE /messages/<id>andPOST /inboxes/<id>/clear– moves the messages to the trash. Messages in the trash do not count against the messages per inbox. - Restore or delete for good
- Restore a message in the app or with
POST /messages/<id>/restore.DELETE /messages/<id>?permanent=truedeletes at once,POST /inboxes/<id>/trash/emptyempties the trash. - After 7 days
- Messages in the trash are deleted permanently after 7 days, earlier if the retention period of your plan ends first. A message in the trash cannot be forwarded until it is restored.
If something does not arrive
535Authentication credentials invalid- Username or password are wrong. After a reset of the credentials the old pair stops working at once – copy the new one from the inbox page.
552Message size exceeds limit- The message is larger than your plan allows. The limits are listed on the pricing page.
451Rate limit exceeded- Your organization sent more messages in a short time than its plan allows. Wait a few seconds and send again.
550Monthly message quota exceeded- Your organization has used up its emails for this month. Sending works again from the first day of the next month, or right away with a larger plan.
Ready to try it?
Create a free account and your first inbox in a few minutes.