import com.coresender.sdk.Coresender;
import com.coresender.sdk.data.Email;
import java.util.List;
public class Example1 {
public static void main(String[] args) {
Coresender coresender = Coresender.builder()
.accountId("<<Coresender sending account id>>")
.apiKey("<<Coresender sending account API key>>")
.build();
coresender.sendSimpleEmail(Email.builder()
.from(Email.Address.of("
[email protected]", "Jean-Luc Picard"))
.to(List.of(Email.Address.of("
[email protected]", "Geordi La Forge")))
.replyTo(List.of(Address.of("
[email protected]")))
.subject("I need engines")
.bodyText("Geordi, I need engines, now!")
.bodyHtml("<p>Geordi, I need engines, <strong>now!</strong></p>")
.customId("1234-qwerty")
.customIdUnique(false)
.trackClicks(true)
.trackOpens(true)
.listUnsubscribe("https://example.com/unsubscribe/abcd-1234")
.listId("no list")
.build());
}
}