cURL
Send emails using cURL with Mailtrap through SMTP integration or API endpoints with code samples and configuration options.
Last updated
Was this helpful?
Send emails using cURL with Mailtrap through SMTP integration or API endpoints with code samples and configuration options.
Mailtrap can be integrated with cURL for email sending via SMTP or email API.
Before we start, you'll need to:
To integrate Mailtrap via SMTP, go to the Integration tab and copy/paste either the credentials or the pre-made code snippets into your configuration.

You can get more information on SMTP integration here.
To integrate Mailtrap and send emails via cURL, use the configuration available among Code samples under the API section.

Once you copy the script, make sure to insert your Mailtrap API token in the Authorization field as Bearer and enter your and your recipient's emails in the --mail-from and --mail-rcpt fields.
Note: To learn more about API integration, click here.
After setting up cURL integration, you can send test emails and monitor delivery through your Mailtrap dashboard to ensure proper configuration.
Last updated
Was this helpful?
Was this helpful?

