百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

maktoub

> 后端框架
开源

一个简单的 Rails 电子邮件发送引擎

310 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个简单的 Rails 电子邮件发送引擎

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

ruby
# Add this line to your Gemfile
gem 'maktoub'

Then bundle install

Compatibility

Compatible with Rails 4+. For Rails 3.1+ use version 0.3.1

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.

Editing Styles

Create a view partial in app/views/layouts/maktoub/_styles.erb. Note that this completely overrides the styles that come with maktoub. You can copy the built-in styles and override them.

Sending messages

Maktoub comes with two rake tasks to allow you to:

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

    ruby
    rake maktoub:test['name_of_my_newsletter_partial']
  • 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

    ruby
     rake maktoub:mail['name_of_my_newsletter_parial']

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

ruby
 Maktoub::NewsletterMailer.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. e.g. mount Maktoub::Engine => '/'
  • you would access the newsletter at: http://example.com//newsletter/my_awesome_newletter

Contributing

Send a pull request including documentation changes and tests.

TODO

  • create github page for project
  • allow management of multiple lists
  • allow rendering of newletter from remotely hosted views (e.g. S3)

Issues· 13 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyenginenewsletterrailsruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架