Code Monkey home page Code Monkey logo

meteor-pretty-email's Introduction

Send pretty emails

meteor add yogiben:pretty-email

What this package does

  1. Replaces boring default Meteor emails
  2. Easily send pretty emails with call to action buttons

alt tag

Usage

  1. Install the package

  2. Set up global options

e.g.

PrettyEmail.options =
  from: '[email protected]'
  logoUrl: 'http://mycompany.com/logo.png'
  companyName: 'myCompany'
  companyUrl: 'http://mycompany.com'
  companyAddress: '123 Street, ZipCode, City, Country'
  companyTelephone: '+1234567890'
  companyEmail: '[email protected]'
  siteName: 'mycompany'
  1. Send your emails
Accounts.sendVerificationEmail Meteor.userId()
Accounts.sendResetPasswordEmail Meteor.userId()
Accounts.sendEnrollmentEmail Meteor.userId()

or using template

PrettyEmail.send 'call-to-action',
  to: '[email protected]'
  subject: 'You got new message'
  heading: 'Your friend sent you a message'
  message: 'Click the button below to read the message'
  buttonText: 'Read message'
  buttonUrl: 'http://mycompany.com/messages/2314'
  messageAfterButton: "I come after the button!"

Templates

Call to action

call-to-action

PrettyEmail.send 'call-to-action', options

Options

from - required

to - required

subject - required

heading - required. Primary heading

headingSmall - optional. Secondary heading

message - required. Message to the user (e.g. 'Your bill has been paid')

buttonText - required. e.g. 'See your bill'

buttonUrl - required. e.g. 'http://mycompany.com/bills/12341234'

Basic

basic

Similar to call-to-action template except that it doesn't have a button and text is not centered.

Options

from - required

to - required

subject - required

heading - required. Primary heading

headingSmall - optional. Secondary heading

message - required. Message to the user (e.g. 'Your bill has been paid')

Global options

You can set your options globally with PrettyEmail.options object. PrettyEmail.send will merge this object with options argument so you can put here some other values (e.g. from to subject).

showFooter - default true

showFollowBlock - default true

facebook twitter googlePlus instagram pinterest youtube linkedin tumblr website email - links to specific social medias

companyName - name of your company (must be specified otherwise footer won't be rendered)

companyUrl - url of your company website

companyEmail - email of your company

companyAddress - address of your company

companyTelephone - telephone number of your company

siteName - name of your website

Custom style

You can change the style of your emails by manipulating PrettyEmail.style object. See default values below:

PrettyEmail.style =
  fontFamily: 'Helvetica'
  textColor: '#606060'
  buttonColor: '#FFFFFF'
  buttonBgColor: '#007FFF'

Customizing Accounts emails

You can change the text in the verification email etc.

e.g.

PrettyEmail.defaults.verifyEmail =
  heading: 'Need to activate your account'
  buttonText: 'Activate'
  ...

meteor-pretty-email's People

Contributors

mpowaga avatar yogiben avatar djhi avatar

Watchers

James Cloos 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.