An open API service indexing awesome lists of open source software.

https://github.com/flaviodamaiajr/mailtrap

📬 Mailtrap for .NET - Simple library to optimize email sending tests using Mailtrap Sandbox Service. ⚡
https://github.com/flaviodamaiajr/mailtrap

dotnet dotnet-core dotnet-standard mail mailtrap sandbox sendmail tests

Last synced: 5 months ago
JSON representation

📬 Mailtrap for .NET - Simple library to optimize email sending tests using Mailtrap Sandbox Service. ⚡

Awesome Lists containing this project

README

          


Technologies   |   
Project   |   
Services   |   
License


Version
Downloads
PRs welcome!
License



Event Platform

## 💻 Project

The main idea of this project is to facilitate tests using the Mailtrap Sandbox Service during the development of features that use email sending (for .NET only).

## 🚀 Technologies

This project is being developed with the following technologies:

- .NET Standard 2.1
- .NET Core 6.0
- NUnit 🧪

## 🤝 Services

- Mailtrap - Email Sandbox Service

## ℹ️ Requirements

It's necessary to create an account on Mailtrap.io to use this library.

## 👨‍💻 How to use

### Add package

It's possible to add using .NET CLI or Package Manager.

#### .NET CLI

```
dotnet add package Mailtrap
```

#### Package Manager

```
PM> Install-Package Mailtrap
```

Check other alternatives on NuGet.org

### Sample Code

```csharp
using Mailtrap.Source.Models;

var mailtrap = new MailtrapSender("your username", "your password");

var email = new Email(
"to@mailtrap.io",
"from@mailtrap.io",
"Sending e-mail test using Mailtrap for .NET 📬",
"Ahoooy! It really works! 😎");

mailtrap.Send(email);
```

Just check our Wiki for more details and samples of how to use **Mailtrap** in your applications.

## 📝 License

This project is under the MIT license. See the file [LICENSE](LICENSE) for more details.

## ☕️ Support

flaviodamaiajr