% title = 'smtp' description = 'The SMTP protocol support provided by mountebank' %> <%- include('../../_header') -%>
At the moment, the smtp imposters only support mock verification. Stubbing support will come as soon as someone describes it as being worth the time to develop. mountebank expects stub responses will be acceptance or rejection of the message.
Parameter | Options | Required? | Default | Description |
---|---|---|---|---|
protocol |
smtp |
Yes | N/A | |
port |
Any valid port number | No | A randomly assigned port. mountebank will return the actual value
in the POST response. |
The port to run the imposter on. |
name |
Any string | No | empty string | Included in the logs, useful when multiple imposters are set up. |
recordRequests |
true or false |
No | false | Adds mock verification support by remembering the requests
made to this imposter. Note that this represents a memory leak for any long running
mb process, as requests are never forgotten. |
Field | Description | Type |
---|---|---|
requestFrom |
The client socket, primarily used for logging and debugging. mountebank currently is unable to get the client port, but may fix that in the near future. | string |
envelopeFrom |
The from address sent in the MAIL command, used as the return
address for bounces. Many client SMTP APIs do not expose this field, and keep it the
same as the from field. |
string |
envelopeTo |
The address sent using the RCPT command. Many client SMTP APIs
hide this field, deriving it from the to , cc , and
bcc fields. |
string |
from |
The sender of the message (sent in the DATA command). |
string |
to |
The recipients of the message (sent in the DATA command). |
array |
cc |
The CC recipients of the message | array |
bcc |
The BCC recipients of the message | array |
subject |
The subject of the message | array |
priority |
The priority of the message | string |
references |
The references of the message | array |
inReplyTo |
The in reply to of the message | array |
text |
The text-only message | string |
html |
The html message | string |
attachments |
The message attachments | array |