truemail-java-client

Truemail web API client library for Java

License

License

${project.licence}
Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

org.truemail-rb
ArtifactId

ArtifactId

truemail-java-client
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

truemail-java-client
Truemail web API client library for Java
Project URL

Project URL

https://github.com/truemail-rb/truemail-java-client
Source Code Management

Source Code Management

http://github.com/truemail-rb/truemail-java-client

Download truemail-java-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.truemail-rb/truemail-java-client/ -->
<dependency>
    <groupId>org.truemail-rb</groupId>
    <artifactId>truemail-java-client</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.truemail-rb/truemail-java-client/
implementation 'org.truemail-rb:truemail-java-client:0.1.0'
// https://jarcasting.com/artifacts/org.truemail-rb/truemail-java-client/
implementation ("org.truemail-rb:truemail-java-client:0.1.0")
'org.truemail-rb:truemail-java-client:jar:0.1.0'
<dependency org="org.truemail-rb" name="truemail-java-client" rev="0.1.0">
  <artifact name="truemail-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.truemail-rb', module='truemail-java-client', version='0.1.0')
)
libraryDependencies += "org.truemail-rb" % "truemail-java-client" % "0.1.0"
[org.truemail-rb/truemail-java-client "0.1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.mockito : mockito-all jar 1.8.0
org.json : json jar 20180130

test (3)

Group / Artifact Type Version
org.powermock : powermock-module-junit4 jar 1.7.4
org.powermock : powermock-api-mockito jar 1.7.4
junit : junit jar 4.6

Project Modules

There are no modules declared in this project.

Truemail web API client library for Java

CircleCI Maven Central GitHub Gitter Contributor Covenant

truemail-java-client - Web API Java client for Truemail Server.

Actual and maintainable documentation 📚 for developers is living here.

Table of Contents

Requirements

Java 1.8+

Installation

Please change {version} to needed version, for example 0.1.0. All available versions you can find here.

Apache Maven

<dependency>
  <groupId>org.truemail-rb</groupId>
  <artifactId>truemail-java-client</artifactId>
  <version>{version}</version>
</dependency>

Gradle Groovy

implementation 'org.truemail-rb:truemail-java-client:{version}'

Apache Ivy

<dependency org="org.truemail-rb" name="truemail-java-client" rev="{version}" />

Groovy Grape

@Grapes(
  @Grab(group='org.truemail-rb', module='truemail-java-client', version='{version}')
)

Usage

import org.truemail_rb.TruemailClient;
import org.truemail_rb.client.TruemailConfiguration;

To have an access for TruemailClient#validate you must create configuration instance first as in the example below:

Creating configuration instance

// Required parameter. It should be true or false
boolean secureConnection = true;

// Required parameter. It should be a hostname or an ip address where Truemail server runs
String host = "example.com";

// Optional parameter. By default it is equal 9292
int port = 80;

// Required parameter. It should be valid Truemail server access token
String token = "token";

TruemailConfiguration truemailConfiguration = new TruemailConfiguration(secureConnection, host, token, port);

// or without port, will be used 9292 port by default
// TruemailConfiguration truemailConfiguration = new TruemailConfiguration(secureConnection, host, token);

Establishing connection with Truemail API

After successful configuration, you can establish connection with Truemail server.

TruemailClient truemailClient = new TruemailClient(truemailConfiguration);
truemailClient.validate("[email protected]")

=>

{
  "date": "2020-10-26 10:42:42 +0200",
  "email": "[email protected]",
  "validation_type": "smtp",
  "success": true,
  "errors": null,
  "smtp_debug": null,
  "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"
  }
}

TruemailClient#validate always returns JSON data. If something goes wrong you will receive JSON with error details:

{
  "truemail_client_error": "error details"
}

Truemail family

All Truemail solutions: https://truemail-rb.org

Name Type Description
truemail ruby gem Configurable plain Ruby email validator, main core
truemail server ruby app Lightweight rack based web API wrapper for Truemail
truemail-rack-docker docker image Lightweight rack based web API dockerized image 🐳 of Truemail server
truemail-ruby-client ruby gem Web API Ruby client for Truemail Server
truemail-crystal-client crystal shard Web API Crystal client for Truemail Server
truemail-rspec ruby gem Truemail configuration, auditor and validator RSpec helpers

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/truemail-rb/truemail-java-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. Please check the open tikets. Be shure to follow Contributor Code of Conduct below and our Contributing Guidelines.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the truemail-java-client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Credits

Versioning

truemail-java-client uses Semantic Versioning 2.0.0

org.truemail-rb
Open source self hosted email validation and verification solutions. Be sure that email address exists.

Versions

Version
0.1.0