# Facteur and Mailtrap · Facteur

> What Mailtrap publishes about its Email Sandbox, HTML previews, spam score and plans, with sources and their date, then what Facteur does.
> https://facteur.eu/en/comparisons/mailtrap

/ Comparison

#  Facteur and Mailtrap 

 Mailtrap offers a fake SMTP server, the Email Sandbox. Here is what it publishes, then what Facteur does.

 [ See Facteur's pricing ](/en/pricing) [ All comparisons ](/en/comparisons) 

 

 Sources

## What Mailtrap publishes

Each line is something Mailtrap 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.

 

1. 01
    
    Mailtrap's Email Sandbox describes itself as a fake SMTP server that traps all emails sent from your application. Each sandbox has its own SMTP credentials.
    
     <https://docs.mailtrap.io/email-sandbox/overview> · 13/10/2026
2. 02
    
    Mailtrap publishes SDKs for Node.js and TypeScript, PHP, Python, Ruby, Java, Go and .NET.
    
     <https://docs.mailtrap.io/email-sandbox/overview> · 13/10/2026
3. 03
    
    The sandbox shows HTML and text previews of emails, validates the HTML and scores spam risk with SpamAssassin.
    
     <https://docs.mailtrap.io/email-sandbox/overview> · 13/10/2026
4. 04
    
    The free Email Sandbox plan shows $0 per month, 50 test emails, 1 sandbox and 1 user.
    
     <https://mailtrap.io/pricing/> · 13/10/2026
5. 05
    
    Three paid Email Sandbox plans are shown with annual billing: Basic at $14 per month (500 test emails, 1 sandbox, 3 users), Team at $34 (5,000 emails, 5 sandboxes, 5 users) and Business at $99 (50,000 emails, 50 sandboxes, 50 users).
    
     <https://mailtrap.io/pricing/> · 13/10/2026
6. 06
    
    The official example of the mailtrap Node client builds new MailtrapClient({ token, testInboxId, accountId }), lists the messages of a test inbox with client.testing.messages.get(inboxId), then reads a message with getTextMessage(inboxId, messageId) or getHtmlMessage(inboxId, messageId).
    
     <https://github.com/mailtrap/mailtrap-nodejs/blob/main/examples/testing/messages.ts> · 25/10/2026
 
 

 Translating your tests

## The same test, with one then the other

Mailtrap's client lists the messages of a test inbox, then asks for the text of one. At Facteur, a single call waits for the matching message and returns it with its code already extracted.

 

       Before, with Mailtrap JavaScript 

 

```
<span class="hl-keyword">const</span> { MailtrapClient } = <span class="hl-property">require</span>(<span class="hl-value">'mailtrap'</span>);
<span class="hl-keyword">const</span> client = <span class="hl-keyword">new</span> <span class="hl-type">MailtrapClient</span>({ token, <span class="hl-property">testInboxId</span>: inboxId, accountId });

<span class="hl-comment">// The list of the test inbox's messages, then the text of the first one.</span>
<span class="hl-keyword">const</span> messages = <span class="hl-keyword">await</span> client.<span class="hl-property">testing</span>.<span class="hl-property">messages</span>.<span class="hl-property">get</span>(inboxId);
<span class="hl-keyword">const</span> text = <span class="hl-keyword">await</span> client.<span class="hl-property">testing</span>.<span class="hl-property">messages</span>.<span class="hl-property">getTextMessage</span>(inboxId, messages[0].<span class="hl-property">id</span>);

<span class="hl-comment">// The code is still to be found in text.</span>
```

 Every call of Mailtrap shown here comes from its documentation: the Sources section gives the page and the date it was read.        After, with Facteur TypeScript 

 

```
<span class="hl-comment">// No Facteur package to install: one HTTP call that waits.</span>
<span class="hl-keyword">const</span> search = <span class="hl-keyword">new</span> <span class="hl-type">URLSearchParams</span>({
  <span class="hl-property">inbox</span>: <span class="hl-value">'j3k9x2mq'</span>,
  <span class="hl-property">sentTo</span>: address,
  <span class="hl-property">wait</span>: <span class="hl-value">'30000'</span>,
});

<span class="hl-keyword">const</span> response = <span class="hl-keyword">await</span> <span class="hl-property">fetch</span>(<span class="hl-value">'https://api.facteur.eu/v1/messages?'</span> + search, {
  <span class="hl-property">headers</span>: { <span class="hl-property">authorization</span>: <span class="hl-value">'Bearer '</span> + process.<span class="hl-property">env</span>.<span class="hl-property">FACTEUR_API_KEY</span> },
});
<span class="hl-keyword">const</span> { messages } = <span class="hl-keyword">await</span> response.<span class="hl-property">json</span>();

<span class="hl-comment">// The code is already extracted, in a field of its own.</span>
<span class="hl-keyword">const</span> code = messages[0].<span class="hl-property">otp</span>;
```

 Facteur publishes no library yet: the test calls the API over HTTP. The developers' portal plays this call against the service.  

 

 The migration, step by step

## Four steps, both services side by side

 

1. Step 01
    
    ### Create an account and an inbox
    
    Each inbox has its own domain, and any address ending with it is accepted from the first message. There is nothing else to set up.
2. Step 02
    
    ### Point the sends at the inbox
    
    Where Mailtrap captures your application's SMTP traffic, your scenarios now write to an address of the inbox: the message follows the real sending path, the one a user will see.
3. Step 03
    
    ### Replace the calls in the tests
    
    Listing the messages and reading the text become a single search, which waits for the message and returns the body, the links and the code already extracted.
4. Step 04
    
    ### Run the suite, then cancel
    
    Keep both accounts until the suite is green: there is no data to export and no DNS to switch.
 
 

 The switch, in short

## What changes, row by row

Each cell about Mailtrap 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 Mailtrap      Reception   Your application writes to an address of the inbox, as it would write to a person.   A fake SMTP server intercepts the emails your application sends. [source](#claim-smtp)     Waiting for a message   The search waits for the message on the server side, five minutes at most.   The official example lists the inbox's messages, then reads the text of one. [source](#claim-client)     Rendering and spam   No rendering preview, no HTML validation, no spam score.   HTML and text previews, HTML validation, SpamAssassin spam score. [source](#claim-analysis)     Libraries   No library published: an HTTP call, from any language.   Kits for Node.js and TypeScript, PHP, Python, Ruby, Java, Go and .NET. [source](#claim-sdk)     Number of inboxes   The number of inboxes depends on the plan: the Pricing page gives it.   The number of sandboxes depends on the plan. [source](#claim-paid)    

 

 Facteur

## What Facteur does

These lines describe Facteur as its product pages and help centre give it.

 

01

### 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.

 

02

### 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.

 

03

### 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.

 

04

### 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.

 

05

### Deleted when its time is up

Each message is deleted when your plan's duration has passed, with its raw file and attachments.

 

06

### Hosted at OVHcloud

The application and its database are hosted at OVHcloud, and billing is in euros. The data centre is in France.

 

07

### 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.

 







 

 

 Choosing

## Frequently asked questions

 

   When to look at Mailtrap? +− Mailtrap publishes HTML previews, HTML validation and a spam score. Facteur's documentation describes none of these. If your test checks how an email renders more than what it contains, look at Mailtrap.

    How much work is the migration from Mailtrap? +− Mechanical work: replace the client, write to the inbox's addresses instead of the SMTP capture, drop the two-step read. There is no data to move and no DNS to switch, and the migration goes file by file.

    What happens to the messages already received at Mailtrap? +− They stay at Mailtrap. They are test data: they come back on the next run of your suite, there is nothing to export.

    Where are Facteur's prices? +− On the Pricing page, which reads Facteur's grid. No Facteur price is written here.

  

 

  Other comparisons

## The other tools

The same approach for each tool: what it publishes, sourced and dated, then what Facteur does.

 

 [01

### Facteur and Mailisk

What Mailisk publishes about its namespaces, its SMS and its free plan, and what Facteur does.

 ](/en/comparisons/mailisk) [02

### Facteur and MailSlurp

What MailSlurp publishes about its plans, inboxes and phone numbers, and what Facteur does.

 ](/en/comparisons/mailslurp) [03

### Facteur and Mailpit

What Mailpit publishes about its open source software, SMTP server and API, and what Facteur does.

 ](/en/comparisons/mailpit) [04

### Facteur and Mailosaur

What Mailosaur publishes about its plans, its daily limit, its SMS and its API, and what Facteur does.

 ](/en/comparisons/mailosaur) [05

### Migrate from Mailosaur

The mapping of the API calls, one by one, and the ones that have no equivalent at Facteur.

 ](/en/migrate-from-mailosaur)

 

 

 

## Try Facteur without an account

The trial receives a test email, with no sign-up. Prices are on the Pricing page.

 [ Try without an account ](/en/test-an-email) [ See pricing ](/en/pricing)
