0.4.0 • Published 4 years ago

@pureprofile/access-node-sdk v0.4.0

Weekly downloads
34
License
UNLICENSED
Repository
github
Last release
4 years ago

Access node sdk

Install

  • yarn add @pureprofile/access-node-sdk || npm install -s @pureprofile/access-node-sdk

Docs

https://github.com/pureprofile-warp/access-node-sdk/blob/master/docs/index.html

sendEmail ⇒ Promise.<Array.<{rcpt: String, message_id: String}>>

Note: Params inside [] are optional

Returns: Promise.<Array.<{rcpt: String, message_id: String}>> - The request promise which resolves with an object if the send was success or rejects if there was an error.

ParamTypeDefaultDescription
confObjectThe config object
conf.endpointstringEmail API endpoint url, can be also autoresolved from env variables
conf.accessKeystringYour unique accessKey
conf.secretstringYour secret
requestObjectThe request object
request.templatestringThe GUID of the template
request.htmlstringThe HTML of the template
request.toArray.<{recipient: String, panel: String, type: ('email'|'user'|'accoh')}>The emails or the GUIDs of the recipients.
request.fromstringThe email address that should send the emails.
request.fromNamestringThe name which should send the email.
request.type'trans' | 'market'The type of the email.
request.replyTostringThe email address that should receive the replies.
request.subjectstringThe subject of the email.
request.varsObjectExtra vars that you want to pass to the argument.
request.prioritynumberThe priority of the emails.
request.scheduledstringAn ISO timestamp if you want to schedule the email for a specific date.
request.addUnsubscribeLinkbooleanfalseInclude an unsubscribe link to the email.

Example

sendEmail({
  acessKey: "",
  secret: ""
}, {
  template: "cada42b4-6cca-4b44-9561-ff29e8dfdbd5",
  to: [
    {
      "recipient": "005cf5c8-ad23-4750-b8a0-b1ecd5bc6ec8",
      "panel": "81b84740-d250-4470-89f8-f3299d8e0e6e",
      "type": "accoh"
    },{
      "recipient": "de4e1e8b-1fe9-4800-a815-ce940206815d",
      "panel": "81b84740-d250-4470-89f8-f3299d8e0e6e",
      "type": "user"
    },{
      "recipient": "chris.sylaios@gmail.com",
      "panel": "81b84740-d250-4470-89f8-f3299d8e0e6e",
      "type": "email"
    }
  ],
  from: "no-reply-dev@pureprofile.com",
  fromName: "Pureprofile",
  type: "trans",
  replyTo: "info@pureprofile.com",
  subject: "test subject"
});
0.4.0

4 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago