File tree Expand file tree Collapse file tree 9 files changed +39
-9
lines changed
src/main/java/com/sparkpost Expand file tree Collapse file tree 9 files changed +39
-9
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,36 @@ public class SparkPost {
5959
6060```
6161
62+ ## Basic Send Email through SparkPost EU
63+
64+ ``` java
65+
66+
67+ package com.sparkpost ;
68+
69+ import com.sparkpost.exception.SparkPostException ;
70+ import com.sparkpost.transport.IRestConnection ;
71+
72+ public class SparkPost {
73+
74+ public static void main (String [] args ) throws SparkPostException {
75+ String API_KEY = " YOUR API KEY HERE!!!" ;
76+
77+ // To use the SparkPost EU use the IRestConnection.SPC_EU_ENDPOINT endpoint
78+ Client client = new Client (API_KEY , IRestConnection . SPC_EU_ENDPOINT );
79+
80+ client. sendMessage(
81+ " you@yourdomain.com" ,
82+ " to@sparkpost.com" ,
83+ " The subject of the message" ,
84+ " The text part of the email" ,
85+ " <b>The HTML part of the email</b>" );
86+
87+ }
88+ }
89+
90+ ```
91+
6292
6393
6494## Advanced Send Email Example
Original file line number Diff line number Diff line change 33 <parent >
44 <groupId >com.sparkpost</groupId >
55 <artifactId >sparkpost</artifactId >
6- <version >0.20 </version >
6+ <version >0.21 </version >
77 </parent >
88 <modelVersion >4.0.0</modelVersion >
99 <artifactId >apps</artifactId >
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >com.sparkpost</groupId >
66 <artifactId >apps</artifactId >
7- <version >0.20 </version >
7+ <version >0.21 </version >
88 </parent >
99 <artifactId >sparkpost-documentor-app</artifactId >
1010 <name >Generates Markdown of Protocol</name >
Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >com.sparkpost</groupId >
88 <artifactId >apps</artifactId >
9- <version >0.20 </version >
9+ <version >0.21 </version >
1010 </parent >
1111 <groupId >com.sparkpost.sample</groupId >
1212 <artifactId >sparkpost-javamail-app</artifactId >
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >com.sparkpost</groupId >
66 <artifactId >apps</artifactId >
7- <version >0.20 </version >
7+ <version >0.21 </version >
88 </parent >
99 <artifactId >sparkpost-samples-app</artifactId >
1010 <name >Example use SparkPost library</name >
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static void main(String[] args) throws SparkPostException {
1010 String API_KEY = "YOUR API KEY HERE!!!" ;
1111
1212 // To use the SparkPost EU use IRestConnection.SPC_EU_ENDPOINT instead of the SPC_US_ENDPOINT
13- Client client = new Client (API_KEY , IRestConnection .SPC_US_ENDPOINT );
13+ Client client = new Client (API_KEY , IRestConnection .SPC_EU_ENDPOINT );
1414
1515 client .sendMessage (
1616 "you@yourdomain.com" ,
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >com.sparkpost</groupId >
66 <artifactId >sparkpost</artifactId >
7- <version >0.20 </version >
7+ <version >0.21 </version >
88 </parent >
99 <modelVersion >4.0.0</modelVersion >
1010 <artifactId >libs</artifactId >
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >com.sparkpost</groupId >
66 <artifactId >libs</artifactId >
7- <version >0.20 </version >
7+ <version >0.21 </version >
88 </parent >
99 <!-- <version>0.10</version> -->
1010 <artifactId >sparkpost-lib</artifactId >
Original file line number Diff line number Diff line change 44 <modelVersion >4.0.0</modelVersion >
55 <groupId >com.sparkpost</groupId >
66 <artifactId >sparkpost</artifactId >
7- <version >0.20 </version >
7+ <version >0.21 </version >
88 <packaging >pom</packaging >
99 <name >*** SparkPost Java Code ***</name >
1010 <description >SparkPost client library for Java https://www.sparkpost.com/</description >
282282 <dependency >
283283 <groupId >com.sparkpost</groupId >
284284 <artifactId >sparkpost-lib</artifactId >
285- <version >0.20 </version >
285+ <version >0.21 </version >
286286 </dependency >
287287
288288 </dependencies >
You can’t perform that action at this time.
0 commit comments