You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this example, we assume you have created a [legacy template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). Following is the template content we used for testing.
112
+
113
+
Template ID (replace with your own):
114
+
18
115
```text
19
116
13b8f94f-bcae-4ec6-b752-70d6cb59f932
20
117
```
@@ -29,19 +126,19 @@ Template Body:
29
126
30
127
```html
31
128
<html>
32
-
<head>
33
-
<title></title>
34
-
</head>
35
-
<body>
36
-
Hello -name-,
37
-
<br /><br/>
38
-
I'm glad you are trying out the template feature!
39
-
<br /><br/>
40
-
<%body%>
41
-
<br /><br/>
42
-
I hope you are having a great day in -city- :)
43
-
<br /><br/>
44
-
</body>
129
+
<head>
130
+
<title></title>
131
+
</head>
132
+
<body>
133
+
Hello -name-,
134
+
<br /><br/>
135
+
I'm glad you are trying out the template feature!
136
+
<br /><br/>
137
+
<%body%>
138
+
<br /><br/>
139
+
I hope you are having a great day in -city- :)
140
+
<br /><br/>
141
+
</body>
45
142
</html>
46
143
```
47
144
@@ -92,7 +189,20 @@ public class Example {
92
189
Request request =newRequest();
93
190
request.setMethod(Method.POST);
94
191
request.setEndpoint("mail/send");
95
-
request.setBody("{\"personalizations\":[{\"to\":[{\"email\":\"[email protected]\"}],\"substitutions\":{\"-name-\":\"Example User\",\"-city-\":\"Denver\"},\"subject\":\"Hello World from the SendGrid Java Library!\"}],\"from\":{\"email\":\"[email protected]\"},\"content\":[{\"type\":\"text/html\",\"value\": \"I'm replacing the <strong>body tag</strong>\"}],\"template_id\": \"13b8f94f-bcae-4ec6-b752-70d6cb59f932\"}");
You can find documentation for how to setup a domain whitelabel via the UI [here](https://sendgrid.com/docs/Classroom/Basics/Whitelabel/setup_domain_whitelabel.html) and via API [here](https://github.com/sendgrid/sendgrid-java/blob/master/USAGE.md#whitelabel).
111
221
112
222
Find more information about all of SendGrid's whitelabeling related documentation [here](https://sendgrid.com/docs/Classroom/Basics/Whitelabel/index.html).
113
223
114
-
<aname="email_stats"></a>
224
+
<aname="email-stats"></a>
115
225
# How to View Email Statistics
116
226
117
227
You can find documentation for how to view your email statistics via the UI [here](https://app.sendgrid.com/statistics) and via API [here](https://github.com/sendgrid/sendgrid-java/blob/master/USAGE.md#stats).
0 commit comments