RyuzakiH / Temp-Mail-API

Unofficial API Client Library for temp-mail.org in .NET Standard
MIT License
37 stars 5 forks source link
10minute 10minutemail api api-client c-sharp client client-api client-library client-libray csharp disposable disposable-email email mail temp-mail tempmail temporary wrapper

Temp-Mail-API AppVeyor NuGet

Unofficial API Client Library for TempMail in .NET Standard

Disposable email - is a service that allows to receive email at a temporary address that self-destructed after a certain time elapses. It is also known by names like : tempmail, 10minutemail, throwaway email, fake-mail or trash-mail. Many forums, Wi-Fi owners, websites and blogs ask visitors to register before they can view content, post comments or download something. Temp-Mail - is most advanced throwaway email service that helps you avoid spam and stay safe.

Installation

PM> Install-Package TempMail.API

Usage

var client = TempMailClient.Create();
var client = await TempMailClient.CreateAsync();
var availableDomains = client.AvailableDomains;
client.ChangeEmail("loginexample", availableDomains[0]);
await client.ChangeEmailAsync("loginexample", availableDomains[0]);
client.Delete();
await client.DeleteAsync();
var mails = client.Inbox.Refresh();
var mails = await client.Inbox.RefreshAsync();
var mails = client.Inbox.Mails;
client.StartAutoCheck(delay: 10000); // default delay is 10s
client.StopAutoCheck();

Occurs when the temporary email changes

client.EmailChanged += (o, e) => Console.WriteLine($"Email changed: {e.Email}");

Occurs when a new mail is received by client

client.Inbox.NewMailReceived += (o, e) => Console.WriteLine($"\tSender: {e.Mail.SenderName}\n\tSubject: {e.Mail.Subject}\n\tBody: {e.Mail.TextBody}");

Additional Features

Sometimes Cloudflare forces captcha challenges or Js challenge cannot be solved, so we need to use CloudflareSolverRe.Captcha package to bypass it using (2captcha or AntiCaptcha)

var client = TempMailClient.Create(
    captchaProvider: new AntiCaptchaProvider("YOUR_API_KEY"));
var client = TempMailClient.Create(
    captchaProvider: new TwoCaptchaProvider("YOUR_API_KEY"));

for more information read the documentation here CloudflareSolverRe

var client = TempMailClient.Create(
    proxy: new WebProxy("163.172.220.221", 8888));

Full Examples Here

Supported Platforms

.NET Standard 1.3

Dependencies