https://github.com/resend/resend-java
Resend's Java SDK
https://github.com/resend/resend-java
Last synced: 2 months ago
JSON representation
Resend's Java SDK
- Host: GitHub
- URL: https://github.com/resend/resend-java
- Owner: resend
- License: mit
- Created: 2023-08-18T20:17:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-10T04:52:27.000Z (2 months ago)
- Last Synced: 2026-04-10T06:34:58.540Z (2 months ago)
- Language: Java
- Homepage:
- Size: 413 KB
- Stars: 39
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Resend Java SDK
[](https://opensource.org/licenses/MIT)


---
## Installation
To install the Java SDK, add the following dependency to your project:
Gradle
```gradle
implementation 'com.resend:resend-java:+'
```
Maven
```Maven
com.resend
resend-java
LATEST
```
## Setup
First, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com).
## Example
```java
package com.resend;
import com.resend.services.emails.model.*;
import com.resend.core.provider.AuthenticationProvider;
import com.resend.core.provider.impl.AuthenticationProviderStandard;
import com.resend.services.emails.ResendEmails;
public class Main {
public static void main(String[] args) {
Resend resend = new Resend("re_123");
CreateEmailOptions params = CreateEmailOptions.builder()
.from("Me ")
.to("to@example", "you@example.com")
.cc("carbon@example.com", "copy@example.com")
.bcc("blind@example.com", "carbon.copy@example.com")
.replyTo("reply@example.com", "to@example.com")
.text("Hello, world!")
.subject("Hello from Java!")
.build();
try {
CreateEmailResponse data = resend.emails().send(params);
System.out.println(data.getId());
} catch (ResendException e) {
e.printStackTrace();
}
}
}
```
You can view all the examples in the [examples folder](https://github.com/resendlabs/resend-java-example)