.NET
Overview
Mailtrap can be integrated with .NET apps and projects for email sending.
Email API/SMTP for .NET
SDK integration
The Mailtrap .NET SDK is a modern, async-first library for sending transactional and bulk emails from .NET applications. The SDK supports:
Transactional email sending
Batch email sending
Template management
Contact management
Sandbox testing
Account management
Async/await pattern support
.NET 6+, .NET Core, and .NET Framework
Installation
Install the SDK using NuGet Package Manager:
Minimal Example
Here's a minimal example to send your first email:
SMTP integration
To integrate SMTP with your .NET app, navigate to the Integrations tab, choose C#, and copy-paste the credentials or ready-made code snippets.

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 .NET programming language or library that supports HTTP requests. For more details, refer to the API documentation.

Read more about API integration here.
Last updated
Was this helpful?

