Sending email with MailSlurp is easy. Simply create an inbox and use the inbox's ID with methods.
Basics
The basic method has the following signature:
Notice the . This is the inbox from which the emails will be sent. The second parameter contains properties describing the email to be sent.
Options
The only required property of is a
field — which is an array of email addresses.
Other optional fields include the following:
Example
HTML and templates
You can flag when sending emails to indicate that HTML content is being sent. This is recommend if you want email providers to render markup correctly.
You can also pass a map of when sending an email and MailSlurp will look for and interpret Moustache templates within your email body.
Attachments
Next steps
That's how sending works at MailSlurp. Let's see it in action by finding the best MailSlurp library or integration for you application or tests.