When sending or receiving emails in MailSlurp you must understand that there are two types of inbox:
SMTP Inbox -- Typically has address ending in
@mailslurp.mxor a custom domain you have created -- Can be accessed via SMTP and IMAP (see your dashboard for username and password)
HTTP inbox -- Usually ends in
@mailslurp.comor a custom domain that you use. -- Still has SMTP server but cannot be accessed directly with username and password -- No IMAP support as uses AWS SES behind the scenes
Diagnosing your inbox error
The first step to find out the source of a 554 email error is to determine that your inbox is type SMTP:
Find the MX records for an address
If your inbox ends in
@mailslurp.mx we can use the
dig command to find the
MX records associated with it.
dig -t mx mailslurp.mx ; <<>> DiG 9.16.1-Ubuntu <<>> -t mx mailslurp.mx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52885 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;mailslurp.mx. IN MX ;; ANSWER SECTION: mailslurp.mx. 600 IN MX 10 mx.mailslurp.com. ;; Query time: 76 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Thu Jan 20 21:31:08 NZDT 2022 ;; MSG SIZE rcvd: 73
Notice the answer section contains an MX record pointing to
mx.mailslurp.com. We can telnet to the server to test SMTP access.
Telnet to SMTP server
MailSlurp SMTP server runs on ports:
Use telnet to connect to MailSlurp:
telnet mx.mailslurp.com 2525
The result of which looks something like this:
Trying 18.104.22.168... Connected to mx.mailslurp.com. Escape character is '^]'. 220 mx.mailslurp.com SMTP Server (MailSlurp) ready
If you see this the server is running and can be reached. Next we will try send an email to an inbox.
Test email receiving
First create an SMTP inbox using your API_KEY and SDK or the dashboard.