Email Data Object (objects/Email.java)

sendgrid-java · src/main/java/com/sendgrid/helpers/mail/objects/Email.java · java · MIT
email, database, lang:java

A data transfer object representing an email address and name. Use this to structure email recipient information for SendGrid API requests.

// Source: https://github.com/sendgrid/sendgrid-java | License: MIT | Copyright 2026, Twilio SendGrid, Inc. <help@twilio.com>
// Provided via justclaw.it.com; keep this notice with the code.
package com.sendgrid.helpers.mail.objects;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(Include.NON_DEFAULT)
public class Email {

  @JsonProperty("name")
  private String name;

  @JsonProperty("email")
  private String email;

  public Email() {
    return;
  }

  public Email(String email) {
    this.setEmail(email);
  }

  public Email(String email, String name) {
    this.setEmail(email);
    this.setName(name);
  }

  @JsonProperty("name")
  public String getNa

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key