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.
PM> Install-Package TempMail.API
Creates and initializes a new temp-mail client with a temporary email
var client = TempMailClient.Create();
var client = await TempMailClient.CreateAsync();
Gets current temporary email
var email = client.Email;
Gets available domains
var availableDomains = client.AvailableDomains;
Changes the temporary email to a specific email (ex: login@domain)
client.ChangeEmail("loginexample", availableDomains[0]);
await client.ChangeEmailAsync("loginexample", availableDomains[0]);
Deletes the temporary email and gets a new one
client.Delete();
await client.DeleteAsync();
Gets all mails in mailbox
var mails = client.Inbox.Refresh();
var mails = await client.Inbox.RefreshAsync();
Gets all mails in mailbox (doesn't update from temp-mail)
var mails = client.Inbox.Mails;
Checks for incoming mails every period of time
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}");
Website sometimes uses Cloudflare protection, so we use CloudflareSolverRe to bypass it.
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