Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 780 Bytes

unsubscriber.md

File metadata and controls

39 lines (29 loc) · 780 Bytes

Unsubscriber resources

Unsubscribe e-mails

Set<String> emails = new HashSet<>();
emails.add("john.doe@example.org");
emails.add("jill.doe@example.org");
mailQ.unsubscribe(emails);

or

mailQ.unsubscribe("john.doe@example.org","jill.doe@example.org");

Get unsubscribers

LocalDateTime from = LocalDateTime.now().minusDays(10);
for (UnsubscriberEntity unsubscriber : mailQ.getUnsubscribers(from,Pagination.DEFAULT)) {
    System.out.println(unsubscriber.getEmail());
}

Get unsubscriber

for (UnsubscriberEntity unsubscriber : mailQ.getUnsubscriber("john.doe@example.org")) {
    System.out.println(unsubscriber.getEmail());
}

Delete unsubscriber

mailQ.deleteUnsubscriber("john.doe@example.org");