Videos
Check out our tutorial video series.
Guide for sending emails in Javascript using an SMTP server or MailSlurp email API or SDK clients. Examples using NodeJS.
Sending email with MailSlurp is easy. Simply create an inbox and use the inbox's ID with methods.
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.
The only required property of is a
field — which is an array of email addresses.
Other optional fields include the following:
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.
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.
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.