EmailChecker (email_checker v0.2.4)

Simple library checking the validity of an email.

Checks (in order)

  • REGEX: validate the emails has a good looking format
  • MX: validate the domain sever contains MX records
  • SMTP: validate the SMTP behind the MX records knows this email address (no email sent; disabled by default)

Link to this section Summary

Link to this section Functions

Link to this function

valid?(email, validations \\ configured_validations())

Specs

valid?(String.t(), [EmailChecker.Check]) :: boolean()

Check a given Email

Parameters

  • email - binary - the email to check
  • validations - function[] - the checks to use (default from config)

Example

iex> EmailChecker.valid?("test@test.ch", [EmailChecker.Check.Format])
true