Git Product home page Git Product logo

sparkpost-mail's Introduction

SparkPost for Meteor

Send emails using SparkPost as the SMTP server

What is SparkPost?

tl;dr - SparkPost is a cloud email delivery service. It's easy to get started with either SMTP or their REST API.

SparkPost is the world’s #1 email delivery and analytics provider. Our customers send over 3 trillion messages a year, 37% of B2C and B2B email.

Get Started with SparkPost

  1. Sign up for a SparkPost account
  2. Add and verify a sending domain
  3. Configure SMTP and save the password

Setup

Install

Add this package using the following command

meteor add agoldman:sparkpost-mail

Example

import { Meteor } from 'meteor/meteor';
import { Sparkpost } from 'meteor/agoldman:sparkpost-mail';

Meteor.startup(() => {
    // configure Sparkpost
    Sparkpost.config('YOUR SMTP PASSWORD');

    // Send an email
    Sparkpost.send({
  	    from: 'postmaster@<YOUR SENDING DOMAIN>.com',
  	    to: '[email protected]',
  	    subject: 'Your Email Subject',
  	    text: 'Message'
    });
});

Documentation

config([options])

  • password An SparkPost API Key that has SMTP permissions
  • username Username for SMTP account - defaults to SMTP_Injection
  • port Port for SMTP - defaults to 587
  • host Host for SMTP - defaults to smtp.sparkpostmail.com
  • from Sets default sending email if none is specified in the send function
  • subject Sets default subject if none is specified in the send function
  • headers Sets default headers if none are specified in the send function
  • secure Boolean to set the connection to smtps or smtp. Defaults to false

send([options])

This is a wrapper function that fills in any defaults specified during configuration before passing the options off to the Email.send function.

sparkpost-mail's People

Contributors

avigoldman avatar jorgenvatle avatar mary-grace avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.