Giter VIP home page Giter VIP logo

temp-mail-api's Introduction

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

  • Initialize Client

Creates and initializes a new temp-mail client with a temporary email

var client = TempMailClient.Create();
var client = await TempMailClient.CreateAsync();
  • Current Email

Gets current temporary email

var email = client.Email;
  • Available Domains

Gets available domains

var availableDomains = client.AvailableDomains;
  • Change Email

Changes the temporary email to a specific email (ex: login@domain)

client.ChangeEmail("loginexample", availableDomains[0]);
await client.ChangeEmailAsync("loginexample", availableDomains[0]);
  • Delete

Deletes the temporary email and gets a new one

client.Delete();
await client.DeleteAsync();
  • Refresh

Gets all mails in mailbox

var mails = client.Inbox.Refresh();
var mails = await client.Inbox.RefreshAsync();
  • Mailbox

Gets all mails in mailbox (doesn't update from temp-mail)

var mails = client.Inbox.Mails;
  • Inbox Auto Check

Checks for incoming mails every period of time

client.StartAutoCheck(delay: 10000); // default delay is 10s
client.StopAutoCheck();
  • Events

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

  • Cloudflare Protection

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

  • Proxy

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

Full Examples Here

Supported Platforms

.NET Standard 1.3

Dependencies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.