Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
133 lines (95 sloc) 4.31 KB

This package automatically generates and sends a newsletter for posts and comments on a predefined schedule.


Every x days, it builds a digest consisting of the top y items posted in the past x days that haven't yet been sent out in a newsletter. It then sends the campaign, and sends you a confirmation email.

Note: this package requires using a third-party email provider (MailChimp and Sendy are currently supported).


meteor add vulcan:newsletter


Vulcan Dependencies

  • vulcan:core
  • vulcan:posts
  • vulcan:comments
  • vulcan:categories
  • vulcan:email

NPM Dependencies


"newsletter": {
  "frequency": [1,2,3,4,5,6,7],
  "time": "00:00",
  "provider": "mailchimp"
"sendy": {
  "server": "",
  "apiKey": "123foo",
  "listId": "456bar",
  "fromName": "Bruce Willis",
  "fromEmail": "",
  "replyTo": ""
"mailchimp": {
  "apiKey": "123foo",
  "listId": "456bar",
  "fromName": "",
  "fromEmail": ""
  • enabled: enable/disable automated newsletter sending.
  • enabledInDev: enable/disable newsletter while in development mode.
  • autoSubscribe: automatically subscribe every new user to your newsletter.
  • frequency: which days the newsletter should go out. 1 is Monday, 2 is Tuesday, etc.
  • time: what time the newsletter should go out.
  • provider: the name of your newsletter provider.

Sendy Settings

  • server: The URL to your self-hosted Sendy server (including trailing /).
  • apiKey: Your API key.
  • listId: List ID.
  • fromName: "From" name.
  • fromEmail: "From" email.
  • replyTo: "Reply to" email.

MailChimp Settings

  • apiKey: Your API key.
  • listId: List ID.

Test Routes

If you want to preview your email templates, you can do so at the following routes:

(Replace http://localhost:3000 with your app's URL)


The package exposes the following GraphQL mutations:

  • sendNewsletter: generate and send the next newsletter.
  • testNewsletter: same as sendNewsletter, but without marking posts as sent.
  • addUserNewsletter(userId: String): add a user to your subscriber list.
  • addEmailNewsletter(email: String): add an email to your subscriber list.
  • removeUserNewsletter(userId: String): remove a user from your subscriber list.

You can call these mutations from any React component using the withMutation HoC:

import React, { PropTypes, Component } from 'react';
import { withMutation } from 'meteor/vulcan:core';

const SendButton = ({ sendNewsletter }) => <button onClick={sendNewsletter}>Send Newsletter</button>

export default withMutation({name: 'sendNewsletter'})(SendButton);


To add a provider, you can start from the sample.js template included in the package.

Any new provider must implement the following methods:

  • Newsletters.providerName.subscribe(email): subscribe an email to your list.
  • Newsletters.providerName.unsubscribe(email): unsubscribe an email from your list.
  • Newsletters.providerName.send({ title, subject, text, html, isTest}): send a newsletter.

NewsletterSubscribe Component

This package also exports a NewsletterSubscribe custom form field component used to add a subscribe/unsubscribe button to the user account page.


Setting Example Description
enabled false Enable the automated newsletter
enabledInDev false Enable the automated newsletter while in development mode
frequency [1,2,3,4,5,6,7] The days on which to send the newsletter (1 = Monday, 2 = Tuesday, etc.)
time "07:55" When to send out the newsletter
autoSubscribe false Whether new users should be automatically subscribed to the newsletter