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. ⚡
- Host: GitHub
- URL: https://github.com/flaviodamaiajr/mailtrap
- Owner: flaviodamaiajr
- License: mit
- Created: 2022-06-27T14:54:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-14T23:21:06.000Z (about 3 years ago)
- Last Synced: 2025-09-28T07:19:01.653Z (9 months ago)
- Topics: dotnet, dotnet-core, dotnet-standard, mail, mailtrap, sandbox, sendmail, tests
- Language: C#
- Homepage:
- Size: 62.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Technologies |
Project |
Services |
License
## 💻 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
