Git Product home page Git Product logo

maktoub's Introduction

Maktoub

Maktoub is a Ruby on Rails engine for email newsletters.

  • Write your newsletter as you would write any view (erb partial)

  • Maktoub sends your email in multipart as both html and text

Installation

# Add this line to your Gemfile
gem 'maktoub'

Then ‘bundle install’

Usage

Configuration

You can run ‘rails generate maktoub:config’ to generate the configuration file. This task creates a matkoub.rb initializer file (in config/initializer) Follow instructions inside the file to configure it the way you want.

Authoring

Create a newsletter as a normal view partial in app/views/maktoub/newsletters/. The subject of the newsletter will be automatically deduced from the partial’s name.

Sending messages

Maktoub comes with two rake tasks to allow you to:

  • send a test message to the “from” address of your newsletter.

    rake maktoub:test

  • publish the newsletter to all your subscribers. If you have delayed_job installed then it will use it to deliver each email as a background job

    rake maktoub:mail

Alternatively you have access to a Maktoub::NewsletterMailer ActionMailer object with a publish method

Maktoub::NewsletterMail.publish('my_newsletter_partial', :name => 'User name', :email => '[email protected]')

View in browser

To be able to view your newsletter in a browser add it to routes.rb.

# mount the engine at a path of your choice.
# you would access the newsletter at: http://example.com/newsletter/my_awesome_newletter
mount Maktoub::Engine => "/"

maktoub's People

Contributors

zawaideh avatar fmalamitsas avatar

Stargazers

Art Powell avatar

Watchers

Jim Gay avatar Ryan Sandridge avatar Christopher Sexton avatar Guille Carlos avatar  avatar Anton Zolotov avatar Pete Campbell avatar Sean Marcia avatar Ben Morris avatar James Cloos avatar Lisa Schaefer avatar Art Powell avatar Sam Turner avatar Aaron Kromer avatar Chris Hoffman avatar

Forkers

willypowell

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.