Mailtrap icon

Mailtrap

Interact with Mailtrap API

Overview

The node provides functionality to send emails using the Mailtrap service. It is designed for scenarios where users want to programmatically send HTML-formatted emails with customizable sender and recipient details. This can be useful for automated notifications, transactional emails, or testing email templates in development environments.

For example, a user can configure the node to send a welcome email to new users, specifying the sender's verified email address, recipient's email, subject line, and the HTML content of the message.

Properties

Name Meaning
Authentication Method of authentication to use: either "API Token" or "Bearer Token".
From Email Sender's email address. The domain must be verified in Mailtrap.
To Email Recipient's email address.
Subject Subject line of the email.
HTML Email content formatted in HTML.
Additional Fields Optional fields including:
- From Name Name of the sender (e.g., "John Doe").
- To Name Name of the recipient (e.g., "John Doe").
- Reply-to Name Name used for the reply-to address.
- Reply-to Email Email address used for replies.

Output

The node outputs JSON data representing the result of the email sending operation. This typically includes information about the success or failure of the request, such as message IDs or status codes returned by the Mailtrap API.

No binary data output is produced by this node.

Dependencies

  • Requires an active Mailtrap account with verified domains for sending emails.
  • Needs an API key or Bearer token for authenticating requests to Mailtrap.
  • Proper configuration of authentication credentials within n8n is necessary.

Troubleshooting

  • Common Issues:

    • Sending from an unverified domain will cause the email to be rejected.
    • Incorrect or expired API/Bearer tokens will lead to authentication failures.
    • Invalid email addresses in "From Email" or "To Email" fields may cause errors.
  • Error Messages:

    • Authentication errors usually indicate invalid or missing credentials; verify and update your API keys.
    • Validation errors on email addresses suggest formatting issues; ensure emails are correctly formatted.
    • Permission errors may occur if the domain is not verified; confirm domain verification in Mailtrap settings.

Links and References

Discussion