Domain Not Allowed
Error Message
Error: Mail command failed: 550 5.7.1 Sending from domain is not allowedThis error occurs when you try to send an email using SMTP with a domain that doesn't match your verified domain in Mailtrap.
Common Causes
1. Domain Mismatch
You're sending an email with FROM: {anything}@mydomain.com, but in Mailtrap, you've verified anotherdomain.com.
The verified domain and FROM domain in your emails must match.
If you verified example.com in Mailtrap, you can only send emails from *@example.com addresses.
2. Domain Not Verified or Compliance Check Failed
Your domain might not be fully verified, or you haven't passed the Compliance Check.
How to Fix
Check Your Verified Domains
Go to Sending Domains in your Mailtrap account.
Verify Domain Status
Look for the Verified badge next to your domain. If you don't see it:
Click on the domain
Check if all DNS records are found by Mailtrap (all should be green)
If any records are missing or incorrect, update them with your DNS provider
Check Compliance Status
Scroll down to see the Compliance Check status.
If the compliance check hasn't passed:
Review any additional steps required
Complete any pending actions
Wait for the check to complete
Update Your FROM Address
Ensure your application sends emails from an address that matches your verified domain:
Correct:
[email protected](ifyourdomain.comis verified)Incorrect:
[email protected](ifotherdomain.comis not verified)
Related Articles
Last updated
Was this helpful?

