Rails 的郵件預覽引擎:MailsViewer

jopen 12年前發布 | 11K 次閱讀 Rails Ruby開發

MailsViewer 是一個Rails 的郵件預覽引擎,提供了表格用來瀏覽 tmp/mails 下的所有郵件,可輕松的瀏覽非產品模式下的郵件。

配置方法:

config.action_mailer.delivery_method = :file
config.action_mailer.file_settings = {
  location: 'tmp/mails',
  smtp_settings: {
    address:              "localhost",
    port:                 25,
    domain:               'localhost.localdomain',
    user_name:            nil,
    password:             nil,
    authentication:       nil,
    enable_starttls_auto: true
  },
  send_if: lambda { |mail| mail.destinations.select { |address| 
    ["yedingding@gmail.com"].include?(address) }.any?
}

項目主頁:http://www.baiduhome.net/lib/view/home/1348187054593

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!