Skip to content

sarthakj178/elasticemail-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elasticemail-js

Installation

npm install --save @sarthakj178/elasticemail-client

Usage

sendMailUsingTemplate('<ELASTIC_EMAIL_API_KEY>', '<ELASTIC_EMAIL_TEMPLATE_ID>', 
  '<FROM_EMAIL_ADDRESS>', '<FROM_NAME>', 
  ['<TO_EMAIL_ADDRESS_1>', '<TO_EMAIL_ADDRESS_2>'],
  ['<CC_EMAIL_ADDRESS_1>', '<CC_EMAIL_ADDRESS_2>'], 
  ['<BCC_EMAIL_ADDRESS_1>', '<BCC_EMAIL_ADDRESS_2>'],
  'Test Subject', {
      'param1': 'value1', 
      'param2': 'value2'
  }, ['s3://<BUCKET_NAME>/PATH/TO/FILE_1', 's3://<BUCKET_NAME>/PATH/TO/FILE_2']).then((res) => {
    console.log(res);
  }, (err) => {
    console.error(err);
  }
);
sendMail('<ELASTIC_EMAIL_API_KEY>',
  '<FROM_EMAIL_ADDRESS>', '<FROM_NAME>', 
  ['<TO_EMAIL_ADDRESS_1>', '<TO_EMAIL_ADDRESS_2>'],
  ['<CC_EMAIL_ADDRESS_1>', '<CC_EMAIL_ADDRESS_2>'], 
  ['<BCC_EMAIL_ADDRESS_1>', '<BCC_EMAIL_ADDRESS_2>'],
  'Test Subject', 'Test Body'
  , ['s3://<BUCKET_NAME>/PATH/TO/FILE_1', 's3://<BUCKET_NAME>/PATH/TO/FILE_2']).then((res) => {
    console.log(res);
  }, (err) => {
    console.error(err);
  }
);

About

Library to send emails using ElasticEmail apis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published