Skip to content

Commit

Permalink
update to version 4.0.5 (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric "Aridjar" Paumard authored and lesv committed Oct 25, 2016
1 parent d4b4d86 commit b757c53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compute/mailjet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>com.mailjet</groupId>
<artifactId>mailjet-client</artifactId>
<version>4.0.1</version>
<version>4.0.5</version>
</dependency>
<!-- [END dependencies] -->
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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);
Expand All @@ -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")
Expand Down

0 comments on commit b757c53

Please sign in to comment.