quartz_mailer~amberframework

A library to get started in sending and receiving emails send email receive smpte imap mailer receive-emails crystal-application quartz-mailer
0.5.1 released

Quartz-Mailer

Build Status

A library to send emails from your Crystal application.

Installation

Add this to your application's shard.yml:

dependencies:
  quartz_mailer:
    github: amberframework/quartz-mailer

Usage

require "quartz_mailer"

The mailer has the ability to set the from, to, cc, bcc, and subject as well as both text and html body formats.

A render helper provides friendly markup rendering with jeromegn/kilt.

class WelcomeMailer < Quartz::Composer
  def sender
    address email: "info@amberframework.org", name: "Amber"
  end

  def initialize(name : String, email : String)
    to name: name, email: email
    subject "Welcome to Amber"
    text render("mailers/welcome_mailer.text.ecr")
    html render("mailers/welcome_mailer.html.slang", "mailer-layout.html.slang")
  end
end

To delivery a new email:

WelcomeMailer.new(name, email).deliver

Contributing

  1. Fork it ( https://github.com/amber-crystal/quartz-mailer/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
quartz_mailer:
  github: amberframework/quartz-mailer
  version: ~> 0.5.1
License MIT
Crystal 0.24.1

Dependencies 2

  • email ~> 0.2.5
    {'github' => 'arcage/crystal-email', 'version' => '~> 0.2.5'}
  • kilt ~> 0.4.0
    {'github' => 'jeromegn/kilt', 'version' => '~> 0.4.0'}

Development Dependencies 0

Last synced .
search fire star recently