GithubHelp home page GithubHelp logo

resend-java's Introduction

Resend Java SDK

License: MIT Build Release

Installation

To install the Java SDK, add the following dependency to your project:

Gradle

implementation 'com.resend:resend-java:3.1.0'

Maven

<dependency>
    <groupId>com.resend</groupId>
    <artifactId>resend-java</artifactId>
    <version>3.1.0</version>
</dependency>

Setup

First, you need to get an API key, which is available in the Resend Dashboard.

Example

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 <[email protected]>")
                .to("to@example", "[email protected]")
                .cc("[email protected]", "[email protected]")
                .bcc("[email protected]", "[email protected]")
                .replyTo("[email protected]", "[email protected]")
                .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

resend-java's People

Contributors

kewynakshlley avatar

Stargazers

 avatar Keidson Roby avatar  avatar Michael Olusanya avatar  avatar  avatar Clément Vandendaelen avatar Trey Perry avatar Yi Yang avatar José Vieira Neto avatar Fir at GH avatar Emmanuelito18 avatar Allan avatar Derich Pacheco avatar  avatar Matheus Nícolas avatar  avatar  avatar Gabriel Alves avatar Airton Felix avatar Lucas Lopes avatar Hebert  F. Barros avatar

Watchers

Jayan Ratna avatar Muragijimana avatar  avatar  avatar

Forkers

jamesdube

resend-java's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.