Skip to content

v1.6.0

Compare
Choose a tag to compare
@bestwebua bestwebua released this 01 Feb 18:56
· 202 commits to master since this release
aad2836
  1. Added Truemail::Validator#as_json
  2. Updated gem documentation
  3. Updated gem development dependencies
  4. Updated gem version to 1.6.0

Possibility to use Truemail validator instance represented as json directly:

Truemail.validate('nonexistent_email@bestweb.com.ua').as_json

=>
# Serialized Truemail::Validator instance
{
  "date": "2020-02-01 10:00:00 +0200",
  "email": "nonexistent_email@bestweb.com.ua",
  "validation_type": "smtp",
  "success": false,
  "errors": {
    "smtp": "smtp error"
  },
  "smtp_debug": [
    {
      "mail_host": "213.180.193.89",
      "port_opened": true,
      "connection": true,
      "errors": {
        "rcptto": "550 5.7.1 No such user!\n"
      }
    }
  ],
  "configuration": {
    "validation_type_by_domain": null,
    "whitelist_validation": false,
    "whitelisted_domains": null,
    "blacklisted_domains": null,
    "smtp_safe_check": false,
    "email_pattern": "default gem value",
    "smtp_error_body_pattern": "default gem value"
  }
}