Troubleshooting - Email Testing
In this article
- Connection errors
- Expected response code 250 but got code "530", with the message "530 5.7.1 Authentication required"
- Messages are not delivered to my Mailtrap inbox
- Mail not delivered to the recipient
- Why is my inbox email address disabled?
- Tech info/ headers unavailable
- I can’t add more team members
- Automatic Forwarding doesn’t work
- I see suspicious emails in my Mailtrap inbox
Connection errors
If you can't connect to the Mailtrap SMTP server and receive errors Connection cannot be established or Connection timed out, follow the steps described below.
First, test your connection using the Telnet utility: telnet sandbox.smtp.mailtrap.io 2525
.
If Telnet shows that a connection can't be established with our server, follow the next steps:
- Try using another SMTP port: 2525, 465, or 25. In most cases, the issue is related to the firewall blocking the SMTP port.
- If none of these ports work, try connecting with a different machine, location, or ISP, or use a VPN. This will help identify the route affected by the issue.
- Check if the SMTP connection is not closed on idle timeout on the server side. If you’ve opened an SMTP connection and haven't closed it afterward, the SMTP server will close the session after the idle timeout time.
To make sure our SMTP server is up and running, go to the Status page. Here, you can check the SMTP server availability from different locations.
If the issue persists, please let us know at support@mailtrap.io.
Expected response code 250 but got code "530", with the "530 5.7.1 Authentication required" message
When you receive the 5.7.1 Authentication required error, it means that either:
- The SMTP authentication is disabled in your configuration, or
- The authentication failed.
In either case, an email was not sent.
Please enable SMTP authentication in your settings and configure your app to enable SMTP authentication. If it is already enabled, revise your credentials and authentication settings, and try sending an email again.
Messages are not delivered to my Mailtrap inbox
If you try sending messages from your app to Mailtrap, but they don't appear in your Mailtrap inbox, first of all, do the following:
1. Check your SMTP integration
- Go to your inbox Integration tab;
- Compare hostname, username, and password with those in your app (if you reset SMTP/POP3, all existing integrations are affected)
2. Make sure that the number and frequency of the messages sent correspond to the terms of your billing plan.
If everything is correct, view your SMTP logs and check whether you received any errors. To view SMTP logs, enable debugging in your email code. Here is an example of how to do this PHPMailer.
If you still can’t figure out why your emails aren’t getting delivered to your Mailtrap inbox, please save an undelivered message in .eml format and send it to us at support@mailtrap.io. Just don't forget to remove any sensitive information!
Mail not delivered to the recipient
Don’t worry; this is expected behavior.
Mailtrap Email Testing is a fake SMTP server that catches test emails sent from your pre-production environment. It stores each one in virtual inboxes, making it easy to test it before sending it to recipients.
With Mailtrap Email Testing, you can’t send emails to real inboxes; we have Mailtrap Email Sending for that. You can, however, test whether emails get sent from your project and immediately detect any malfunctions.
You can also view each message sent this way. To do so, open your Mailtrap dashboard, head to your inbox, and find your emails there. If any of them is missing, your app may have trouble sending emails, and it’s something worth looking into.
Read more about how it works in our Getting Started Guide.
Why is my inbox email address disabled?
Email per inbox is a premium feature available in the Business plan or higher.
Once you upgrade your plan, make sure you activate the address. Go to the Email Address tab in your inbox, click the three-dot menu to the right, and select Enable.
Of course, you can freely test emails with Mailtrap Email Testing without this feature.
With any plan (including the free tier), you can integrate Mailtrap’s SMTP credentials into your app and receive every email sent this way.
You’ll find the integration samples for over 20 frameworks and libraries on the Integration page of your inbox. You can also use the Mailtrap Email Testing API without any restrictions. Read more about getting started with Mailtrap.
Email per inbox just opens up some more possibilities. After you enable an individual address for your inbox, you may use it, for example, to capture emails sent from your ESP or any other external service. Each message sent to this address will land in the respective Mailtrap inbox.
Tech info/headers unavailable
The Tech Info tab will show the following headers if they’re present in an email:
- Message_id
- X_mailer
- Sender
- From
- To
- Cc
- Reply_to
- Return_path
If any of these headers haven’t been specified (for example, an email doesn’t have a reply_to header specified), it won’t be displayed.
If you are on the Business plan or higher (view Mailtrap plans), you will also see the BCC header in this tab (if specified for the message). On lower plans, no bcc field will appear even if it was included with a message.
I can’t add more team members
If that happens, you may have reached the user limit of your plan.
Each Mailtrap plan, starting from the Team plan, has a maximum number of team members you can add to your projects and inboxes. Free and Individual plans don’t allow adding team members.
For example, if you’re on the Team plan, you have a limit of 20 team members. This means that you can add up to 20 unique users across all your projects and inboxes. If you add, let’s say, user1@example.com to Project A and user2@example.com to one of the inboxes under Project B, this will count as 2/20 team members.
Of course, a user added to a project will have access to all inboxes under the project. As such, they don't need to be added separately. If you add user1@example.com to project A and then add the same user1@example.com to one of the inboxes under project B, this will count as 1/20 team members.
Please note that the amount of team members is calculated based on users who have already been added plus pending invitations. If your limit is 20, and you have 13 project members and 7 pending invitations, you won’t be able to send a new invitation. First, you’ll need to cancel one of the invitations or remove one of the invitees.
Automatic Forwarding doesn’t work
If your test emails aren’t forwarded, there’s very probably an error in the auto-forwarding configuration.
When auto-forwarding to the predefined addresses/domains, Mailtrap verifies the ‘to’ and ‘cc’ headers of a message (bcc is ignored). An email is forwarded if:
- TO or CC of your email matches the value in the Emails list or
- The domain in the TO or CC of your email matches the value in the Domains list.
Remember that a forwarding rule needs to be verified (its status must be ‘Active’) before it can be considered. To do that, you’ll need to confirm the email address or the domain's ownership.
If a particular email is not forwarded, check its headers via the Tech Info tab to see whether you have the correct TO or CC address set.
I see suspicious emails in my Mailtrap inbox
If you see emails in your Mailtrap inbox that you didn’t send from your app, someone may have accessed your Mailtrap SMTP credentials.
Don’t panic, though. It’s very easy to reset your credentials. Log in to your Mailtrap dashboard, open your inbox, and go to the Integration tab. There, click the Reset Credentials button, and your details will be reset right away. Make sure you update them in your app, as old credentials will no longer be valid.
Unfortunately, we don’t store information about the server or IP address that sent the message in question. As such, we won’t be able to help you track down the sender.