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("[email protected]");
emails.add("[email protected]");
mailQ.unsubscribe(emails);

or

mailQ.unsubscribe("[email protected]","[email protected]");

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("[email protected]")) {
    System.out.println(unsubscriber.getEmail());
}

Delete unsubscriber

mailQ.deleteUnsubscriber("[email protected]");