Mailtrap PHP integration

Mailtrap can be integrated with PHP apps and projects for sending and/or testing purposes. Choose the one that suits your needs.

Email API/SMTP for PHP

SDK integration

You can integrate Mailtrap into your PHP project or app using the official SDK. The SDK offers access to both Transactional and Bulk Streams, Email Templates, and Account Management and provides dedicated bridges for Laravel and Symfony. 

SMTP integration 

To integrate SMTP with your PHP app, navigate to the Integrations tab, choose the desired PHP framework, and copy-paste the credentials or ready-made code snippets.

Note that SMTP integration is compatible with any PHP framework or library that sends emails via SMTP.

Read more about SMTP integration here

RESTful API integration

To integrate Mailtrap using RESTful API, use the configuration available among Code samples under the API section. 

API integration can be used with any PHP framework or library that supports HTTP requests. For more details, refer to the API documentation.

Read more about API integration here

Email Testing for PHP

SDK integration

You can integrate Mailtrap Email Testing with your PHP project using the official SDK. And here are some examples.

SMTP integration 

Within the Email Testing menu, navigate to the Inbox and find your SMTP credentials and code snippets for PHP frameworks. Then, simply copy/paste them into your PHP project.

You can integrate Email Testing with any PHP framework or library that sends emails via SMTP.

Read more about Email Testing SMTP integration here

RESTful API integration

To use Email Testing API, simply copy/paste the API endpoint and API Token into the configuration file of a PHP framework or library that supports HTTP requests. 

For more details, refer to the API docs.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us