# Code Examples
Here are the examples of sending emails with API V2 in different languages.
# Python
template delivery &&address list
# Java
WEBAPI_4.4 code example is dependent on httpclient4.4
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
WEBAPI_4.4 code example is dependent on httpclient4.4
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
httpclient (opens new window) httpmime (opens new window) org.json (opens new window)
SMTP_code example SMTP_code example
SMTP_code example SMTP_code example 2
# PHP
template delivery &&address list
# Ruby
rest_client is required for dependent code
gem install 'rest-client'
1
template delivery&&address list
# Perl
Template delivery is dependent on json package.
Download at
https://metacpan.org/pod/JSON
1
2
2
template delivery&&address list
# CSharp
template delivery&&address list
# Go
# Nodejs
package.json
{
"name": "1.node-demo",
"version": "1.0.0",
"description": "",
"main": "1.sendEmail.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.1.3",
"form-data": "^4.0.0",
"nodemailer": "^6.8.0"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17