-
Notifications
You must be signed in to change notification settings - Fork 0
Email Service
Gihan Karunarathne edited this page Jun 17, 2014
·
1 revision
Email Service.
var swisher_client = require('swisher-client'),
email = swisher_client.Email("7780aa6c75f9439ed416e0501294a3831abe1a05", "8", {
grantType : "access_token",
scope : "test"
});Parameters:
In this parameter, it should be specified recipients’details as a json array.
Details of the sender.This also should be specified as a json object. Single email and name parameters as a object.
Subject of the email which it to be sent..
Message that you want to send. This should be specified as a json array.
Optional parameters (Empty object such as {} or JSON object provide with key value pairs);
-
cc (Array of JSON objects) Carbon Copy address. This also should be specified as a json array.
-
bcc (Array of JSON objects) Blind Carbon Copy address. This also should be specified as a json array.
email.send(
[
{"name": "JohnTaylor", "email": "john@example.com"},
{"name": "JimmyHolder", "email": "jimmy@example.com"}
],
{"name": "AndrewSmith", "email": "smith@example.com"},
"Introducing New Service",
[
{"type": "text", "content": "TestMessage"}
],
{
"bcc": [
{"name": "SandraCollins", "email": "collins@example.com"}
],
"cc": [
{"name": "MikeTracer", "email": "mike@example.com"}
]
},
function (err, result) {
if (err) {
// Handle Error Here
} else {
// -- Code Here
}
});