From b757c531bad24cac5ce3b903c302595df73922a4 Mon Sep 17 00:00:00 2001 From: "Cedric \"Aridjar\" Paumard" Date: Tue, 25 Oct 2016 19:02:54 +0200 Subject: [PATCH] update to version 4.0.5 (#384) --- compute/mailjet/pom.xml | 2 +- .../java/com/example/compute/mailjet/MailjetSender.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compute/mailjet/pom.xml b/compute/mailjet/pom.xml index f9e7cf30bff..b975cc89644 100644 --- a/compute/mailjet/pom.xml +++ b/compute/mailjet/pom.xml @@ -50,7 +50,7 @@ com.mailjet mailjet-client - 4.0.1 + 4.0.5 diff --git a/compute/mailjet/src/main/java/com/example/compute/mailjet/MailjetSender.java b/compute/mailjet/src/main/java/com/example/compute/mailjet/MailjetSender.java index 93a06515a3e..fc39c511333 100644 --- a/compute/mailjet/src/main/java/com/example/compute/mailjet/MailjetSender.java +++ b/compute/mailjet/src/main/java/com/example/compute/mailjet/MailjetSender.java @@ -21,6 +21,7 @@ import com.mailjet.client.MailjetRequest; import com.mailjet.client.MailjetResponse; import com.mailjet.client.errors.MailjetException; +import com.mailjet.client.errors.MailjetSocketTimeoutException; import com.mailjet.client.resource.Email; // [END mailjet_imports] @@ -30,7 +31,7 @@ // [START app] public class MailjetSender{ - public static void main(String[] args) { + public static void main(String[] args) throws MailjetException, MailjetSocketTimeoutException { final String mailjetApiKey = "YOUR-MAILJET-API-KEY"; final String mailjetSecretKey = "YOUR-MAILJET-SECRET-KEY"; MailjetClient client = new MailjetClient(mailjetApiKey, mailjetSecretKey); @@ -39,7 +40,8 @@ public static void main(String[] args) { sender.sendMailjet(args[0], args[1], client); } - public MailjetResponse sendMailjet(String recipient, String sender, MailjetClient client) { + public MailjetResponse sendMailjet(String recipient, String sender, MailjetClient client) + throws MailjetException, MailjetSocketTimeoutException { MailjetRequest email = new MailjetRequest(Email.resource) .property(Email.FROMEMAIL, sender) .property(Email.FROMNAME, "pandora")