Code Monkey home page Code Monkey logo

reacher-mail-backend's Introduction

Actions Status Github Sponsor



reacher

⚙️ Reacher Backend

Backend Server for Reacher Email Verification API: https://reacher.email.



This repository holds the backend for Reacher. The backend is a HTTP server with the following components:

⚠️ Importance Notice: WIP branch

The master branch you are viewing now contains Work in Progress code on the bulk API endpoint. Some beta Docker images are also shipped for early usage. Please note that the API might change and the code is not considered stable or production-ready. Please use this branch only if you know what you are doing.

For the latest stable realease, please use v0.3.12.

Get Started

There are 3 ways you can run this backend.

1. One-Click Deploy to Heroku

Deploy

After clicking on the button, just follow the instructions on screen.

2. Use Docker

The Docker image is hosted on Docker Hub: https://hub.docker.com/r/reacherhq/backend.

To run it, run the following command:

docker run -p 8080:8080 reacherhq/backend

You can then send a POST request with the following body to http://localhost:8080/v0/check_email:

{
	"to_email": "[email protected]",
	"from_email": "[email protected]", // (optional) email to use in the `FROM` SMTP command, defaults to "[email protected]"
	"hello_name": "my-server.com",    // (optional) name to use in the `EHLO` SMTP command, defaults to "localhost"
	"proxy": {                        // (optional) SOCK5 proxy to run the verification through, default is empty
		"host": "my-proxy.io",
		"port": 1080
	},
	"smtp_port": 587                  // (optional) SMTP port to do the email verification, defaults to 25
}

3. Run locally

If you prefer to run the server locally on your machine, just clone the repository and run:

cargo run

The server will then be listening on http://127.0.0.1:8080.

Configuration

These are the environment variables used to configure the HTTP server:

Env Var Required? Description Default
DATABASE_URL Yes Database connection string for storing results and task queue not defined
RCH_FROM_EMAIL No The email to use in the MAIL FROM: SMTP command. [email protected]
RCH_HTTP_HOST No The host name to bind the HTTP server to. 127.0.0.1
PORT No The port to bind the HTTP server to, populated by Heroku. 8080
RCH_SENTRY_DSN No If set, bug reports will be sent to this Sentry DSN. not defined
RCH_SAASIFY_SECRET No If set, all requests must have a x-saasify-proxy-secret header set, equal to the value of RCH_SAASIFY_SECRET. not defined
RUST_LOG No One of trace,debug,warn,error,info. 💡 PRO TIP: RUST_LOG=debug is very handful for debugging purposes. not defined
RCH_DATABASE_MAX_CONNECTIONS No Connections created for the database pool 5
RCH_MINIMUM_TASK_CONCURRENCY No Minimum number of concurrent running tasks below which more tasks are fetched 10
RCH_MAXIMUM_CONCURRENT_TASK_FETCH No Maximum number of tasks fetched at once 20

REST API Documentation

Read docs on https://help.reacher.email/rest-api-documentation.

The API basically only exposes one endpoint: POST /v0/check_email expecting the following body:

{
	"to_email": "[email protected]",
	"from_email": "[email protected]", // (optional) email to use in the `FROM` SMTP command, defaults to "[email protected]"
	"hello_name": "my-server.com",    // (optional) name to use in the `EHLO` SMTP command, defaults to "localhost"
	"proxy": {                        // (optional) SOCK5 proxy to run the verification through, default is empty
		"host": "my-proxy.io",
		"port": 1080
	},
	"smtp_port": 587                  // (optional) SMTP port to do the email verification, defaults to 25
}

Also check openapi.json for the complete OpenAPI specification.

License

reacherhq/backend's source code is provided under a dual license model.

Commercial license

If you want to use reacherhq/backend to develop commercial sites, tools, and applications, the Commercial License is the appropriate license. With this option, your source code is kept proprietary. Purchase an reacherhq/backend Commercial License at https://reacher.email/pricing.

Open source license

If you are creating an open source application under a license compatible with the GNU Affero GPL license v3, you may use reacherhq/backend under the terms of the AGPL-3.0.

Read more about Reacher's license.

Sponsor my Open-Source Work

If you like my open-source work at Reacher, consider sponsoring me! You'll also get 8000 free email verifications every month with your Reacher account, and a this contribution would mean A WHOLE LOT to me.

reacher-mail-backend's People

Contributors

amaury1729 avatar daquino avatar dependabot-preview[bot] avatar dependabot[bot] avatar twitu avatar

Watchers

 avatar

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.