use of com.mailjet.client.MailjetRequest in project teammates by TEAMMATES.
the class MailjetService method sendEmailWithService.
@Override
protected void sendEmailWithService(EmailWrapper wrapper) throws MailjetException, MailjetSocketTimeoutException {
MailjetRequest email = parseToEmail(wrapper);
MailjetClient mailjet = new MailjetClient(Config.MAILJET_APIKEY, Config.MAILJET_SECRETKEY);
MailjetResponse response = mailjet.post(email);
if (isNotSuccessStatus(response.getStatus())) {
log.severe("Email failed to send: " + response.getData().toString());
}
}
Aggregations