Mailtrap icon

Mailtrap

Interact with Mailtrap API

Overview

The node provides functionality to send emails through a mail service. It is designed to facilitate sending customized emails by specifying sender and receiver details, subject, and HTML content. This node is beneficial in scenarios such as automated notifications, marketing campaigns, or transactional emails where programmatic email dispatch is required.

For example, you can use this node to send a welcome email to new users after they register on your platform, or to notify team members about system alerts automatically.

Properties

Name Meaning
Authentication Method of authentication to use when sending the email. Options: "API Token", "Bearer Token"
From Name The name of the sender displayed in the recipient's inbox (optional).
From Email The sender's email address (required).
Reply-to Name The name shown for the reply-to address (optional).
Reply-to Email The email address where replies should be sent (optional).
To Name The recipient's name (optional).
To Email The recipient's email address (required).
Subject The subject line of the email (required).
HTML The HTML content/body of the email (required).

Output

The node outputs JSON data representing the result of the email sending operation. This typically includes information such as message ID, status, or any response from the mail service confirming the email was sent successfully.

If the node supports binary data output (e.g., attachments), it would represent those as binary fields, but based on the provided code and properties, the primary output is JSON with email sending results.

Dependencies

  • Requires an external mail service API that supports sending emails via either API token or bearer token authentication.
  • The user must provide valid authentication credentials (API token or bearer token).
  • No additional environment variables are explicitly required beyond the authentication tokens.
  • The node depends on internal methods and routing logic bundled in its dependencies to perform the actual sending.

Troubleshooting

  • Common issues:
    • Invalid or missing authentication tokens will cause authorization failures.
    • Incorrect email addresses (sender or recipient) may cause the mail service to reject the request.
    • Missing required fields like "From Email," "To Email," "Subject," or "HTML" will prevent the email from being sent.
  • Error messages:
    • Authorization errors usually indicate invalid or expired tokens; verify and update credentials.
    • Validation errors often point to missing or malformed input properties; ensure all required fields are correctly filled.
    • Network or service errors might occur if the mail service is unreachable; check connectivity and service status.

Links and References

Discussion