Facteur and MailSlurp
MailSlurp offers test inboxes and, on its higher plans, phone numbers. Here is what it publishes, then what Facteur does.
What MailSlurp publishes
Each line is something MailSlurp publishes. It carries the address of the page where we read it and the date we read it. What we could not check is not here. These pages change: read the source again before you decide.
-
01
Five plans are listed: Free at $0, Starter at $19.99 per month, Pro at $49.99, Growth at $129.99 and Enterprise on quote.
-
02
The Free plan shows 500 emails received per month, 100 inbox creations per month and 50 retained inboxes.
-
03
Beyond what is included, the Pro and Growth plans bill extra inbox creations by usage.
-
04
Phone numbers come with the Pro, Growth and Enterprise plans, up to 5 rentals on Pro and 35 on Growth.
-
05
The JavaScript client installs with npm install --save mailslurp-client. A test creates an inbox with createInbox(), then waits for the latest email with waitForLatestEmail(inbox.id, timeoutMs). The documentation recommends a 60,000 ms timeout, because SMTP is a slow protocol.
The same test, with one then the other
Both APIs wait for the message instead of leaving it to your suite, and the shape of the test stays the same. What changes comes down to two points: there is no inbox to create, and the code no longer needs extracting.
const { MailSlurp } = require('mailslurp-client');
const mailslurp = new MailSlurp({ apiKey: process.env.MAILSLURP_API_KEY });
// An inbox created for the test, which the application writes to.
const inbox = await mailslurp.createInbox();
// Waits for the latest email; the documentation recommends 60,000 ms.
const email = await mailslurp.waitForLatestEmail(inbox.id, 60000);
// The code is still to be found in the body of email.
// No Facteur package to install: one HTTP call that waits.
const search = new URLSearchParams({
inbox: 'j3k9x2mq',
sentTo: address,
wait: '30000',
});
const response = await fetch('https://api.facteur.eu/v1/messages?' + search, {
headers: { authorization: 'Bearer ' + process.env.FACTEUR_API_KEY },
});
const { messages } = await response.json();
// The code is already extracted, in a field of its own.
const code = messages[0].otp;
Four steps, both services side by side
-
Step 01
Create an account and an inbox
The address already exists: each inbox has its own domain and accepts any address ending with it. The createInbox() at the top of the test goes away.
-
Step 02
Write to one address per test
Each test picks its address, for example signup+run-42 followed by the inbox's domain. Two tests in parallel never read the same message.
-
Step 03
Replace the wait and the extraction
waitForLatestEmail(inbox.id, timeout) becomes a search with inbox, sentTo and wait. The code arrives in the otp field: the regular expression has no purpose any more.
-
Step 04
Run the suite, then cancel
Nothing needs moving: test messages come back on the next run. Keep both accounts until everything is green.
What changes, row by row
Each cell about MailSlurp links to the sentence of the sources it comes from. A row that no source lets us write is not in the table.
| Topic | Facteur | MailSlurp |
|---|---|---|
| Before sending | Nothing to create: any address of the inbox's domain arrives. | An inbox created by createInbox() at the top of the test. source |
| Waiting for a message | The search waits on the server side, five minutes at most. | waitForLatestEmail(inbox.id, timeoutMs), with 60,000 ms recommended. source |
| Billing | A volume included in the plan, then prepaid packs or capped overage. | Beyond what is included, inbox creations are billed by usage on Pro and Growth. source |
| Phone numbers | Numbers from the Solo plan up, but the connection to the carrier is not in service. | Numbers on the Pro, Growth and Enterprise plans. source |
What Facteur does
These lines describe Facteur as its product pages and help centre give it.
One address per test
Everything before the at sign is free. Two tests writing to inscription+run-42 and inscription+run-43 each get their own message, in the same inbox.
Wait for the message in one request
The search accepts a wait of five minutes at most. If nothing arrives, it answers an empty list, not an error.
The code, already extracted
The otp field holds the most likely one-time code. When nothing announces it, Facteur leaves it empty rather than guess.
Reading costs nothing
Only a received, kept message counts against your plan. A test that receives 3 emails and reads them 40 times uses 3.
Deleted when its time is up
Each message is deleted when your plan's duration has passed, with its raw file and attachments.
Hosted at OVHcloud
The application and its database are hosted at OVHcloud, and billing is in euros. The data centre is in France.
SMS are not received yet
The connection to the carrier that delivers SMS is not in service. An assigned number receives no real SMS today.
Frequently asked questions
When to look at MailSlurp?
MailSlurp publishes phone numbers on its Pro, Growth and Enterprise plans. At Facteur, receiving real SMS is not in service yet. If you need to receive SMS right now, look at MailSlurp.
How much work is the migration from MailSlurp?
One line per call: createInbox() goes away, waitForLatestEmail() becomes Facteur's search, and extracting the code becomes reading a field. The migration goes file by file, with both services in parallel.
What happens to the messages already received at MailSlurp?
They stay at MailSlurp. They are test messages: they come back on the next run of your suite.
Where are Facteur's prices?
On the Pricing page, which reads Facteur's grid. No Facteur price is written here.
The other tools
The same approach for each tool: what it publishes, sourced and dated, then what Facteur does.
Facteur and Mailisk
What Mailisk publishes about its namespaces, its SMS and its free plan, and what Facteur does.
Facteur and Mailtrap
What Mailtrap publishes about its email sandbox, HTML previews and plans, and what Facteur does.
Facteur and Mailpit
What Mailpit publishes about its open source software, SMTP server and API, and what Facteur does.
Facteur and Mailosaur
What Mailosaur publishes about its plans, its daily limit, its SMS and its API, and what Facteur does.
Migrate from Mailosaur
The mapping of the API calls, one by one, and the ones that have no equivalent at Facteur.
Try Facteur without an account
The trial receives a test email, with no sign-up. Prices are on the Pricing page.