SendGrid SMTP API Java Bindings


License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.revinate
ArtifactId

ArtifactId

sendgrid-smtpapi-java
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

SendGrid SMTP API Java Bindings
SendGrid SMTP API Java Bindings
Project URL

Project URL

https://github.com/revinate/sendgrid-smtpapi-java
Source Code Management

Source Code Management

https://github.com/revinate/sendgrid-smtpapi-java

Download sendgrid-smtpapi-java

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.json : json jar 20140107

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

SendGrid SMTP API Java Bindings

This module lets you build SendGrid's SMTP API headers with simplicity.

BuildStatus BuildStatus

Requirements

Java 1.6 and later.

Installation

Maven

Add this dependency to your project's POM:

<dependency>
  <groupId>com.revinate</groupId>
  <artifactId>sendgrid-smtpapi-java</artifactId>
  <version>2.0.0</version>
</dependency>

Gradle

Add this dependency to your project's build script:

compile 'com.revinate:sendgrid-smtpapi-java:2.0.0'

Usage

Create header

import com.revinate.sendgrid.smtpapi.*;
SmtpApi header = new SmtpApiImpl();

Get header value

String headerValue = header.toSmtpApiHeader();

If you need the unescaped JSON string:

String rawHeaderValue = header.toRawSmtpApiHeader();

To

header.addSmtpApiTo("[email protected]");
// or
header.addSmtpApiTo("[email protected]", "Email User");

List<String> tos = header.getSmtpApiTos();

Substitutions

header.addValueToSubstitution("key", "value");

List<String> substitution = header.getSubstitution("key");

Unique Arguments

header.setUniqueArg("key", "value");

String arg = header.getUniqueArg("key");

Categories

header.addCategory("category");

List<String> categories = header.getCategories();

Sections

header.setSection("key", "section");

String section = header.getSection("key");

Filters

header.setSettingInFilter("filter", "setting", "value");
header.setSettingInFilter("filter", "setting", 1);

Map<String, Object> filter = header.getFilter("filter");

ASM Group ID

header.setAsmGroupId(1);

Integer groupId = header.getAsmGroupId();

Scheduling

header.setSendAt(1416427645);

Integer sendAt = header.getSendAt();

IP Pool

header.setIpPool("transactional");

String ipPool = header.getIpPool();

License

Licensed under the MIT License.

com.revinate

Revinate, Inc.

Versions

Version
2.0.0
1.2.1