github.com/GrottoPress/halo

SMTP adapter for Carbon mailer

1 stars
1 dependent
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  halo:
    github: GrottoPress/halo
    version: ~> 0.3.2

Then run:

shards install

shard.yml

Crystal
~> 1.4
License
MIT
Authors
GrottoPress, N Atta Kusi Adusei

Dependencies

Runtime Dependencies

  • email~> 0.7.0github: arcage/crystal-email

Development Dependencies

  • ameba~> 1.0.0github: crystal-ameba/amebadev
  • carbon~> 0.5.0github: luckyframework/carbondev
  • devmail*github: tijn/devmail, commit: 8f6b6a2f6199ef856e037ff9ef70c7971296c62bdev

README

Halo

Halo is a simple SMTP adapter for Carbon mailer.

Installation

  1. Add the dependencies to your shard.yml:

    dependencies:
      halo:
        github: GrottoPress/halo
      carbon:
        github: luckyframework/carbon
        version: ~> 0.5.0
  2. Run shards install

Usage

Set an instance of Halo::Adapter as Carbon's adapter:

require "carbon"
require "halo"

abstract class BaseEmail < Carbon::Email
end

BaseEmail.configure do |settings|
  settings.adapter = Halo::Adapter.new(
    host: "smtp.domain.tld",
    port: 587,
    username: "user@domain.tld",
    password: "a1b2c3",
    domain: "domain.tld" # HELO domain
  )
end

That's it! Send emails as usual. Check out Carbon's documentation for details.

Development

Run tests with crystal spec -p.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.