|
1 |
| -package com.example.managedvms.mailjet; |
| 1 | +/** |
| 2 | + * Copyright 2016 Google Inc. All Rights Reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
2 | 16 |
|
3 |
| -import org.json.JSONArray; |
4 |
| -import org.json.JSONObject; |
| 17 | +package com.example.managedvms.mailjet; |
5 | 18 |
|
6 | 19 | import com.mailjet.client.MailjetClient;
|
7 | 20 | import com.mailjet.client.MailjetRequest;
|
8 | 21 | import com.mailjet.client.MailjetResponse;
|
9 | 22 | import com.mailjet.client.errors.MailjetException;
|
10 | 23 | import com.mailjet.client.resource.Email;
|
11 | 24 |
|
| 25 | +import org.json.JSONArray; |
| 26 | +import org.json.JSONObject; |
| 27 | + |
12 | 28 | import java.io.IOException;
|
13 | 29 |
|
14 | 30 | import javax.servlet.ServletException;
|
@@ -38,8 +54,7 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx
|
38 | 54 | "Dear passenger, welcome to Mailjet! May the delivery force be with you!")
|
39 | 55 | .property(Email.HTMLPART,
|
40 | 56 | "<h3>Dear passenger, welcome to Mailjet!</h3><br/>May the delivery force be with you!")
|
41 |
| - .property(Email.RECIPIENTS, |
42 |
| - new JSONArray().put(new JSONObject().put("Email", recipient))); |
| 57 | + .property(Email.RECIPIENTS, new JSONArray().put(new JSONObject().put("Email", recipient))); |
43 | 58 |
|
44 | 59 | try {
|
45 | 60 | // trigger the API call
|
|
0 commit comments