Skip to content

v0.10.0

Choose a tag to compare

@eelcoj eelcoj released this 24 May 09:04
· 38 commits to main since this release
34bb65c

Markdown support

You can now write your emails using markdown! Simply bundle any supported markdown gem (redcarpet, kramdown or commonmarker) and it will be used (a technique I borrowed from Perron). Define a markdown method in your email class:

class OrderEmail < Courrier::Email
  def subject = "Your order is ready!"

  def markdown
    <<~MARKDOWN
      # Hello #{name}!

      Your order **##{order_id}** is ready for pickup.

      ## Order Details
      - Item: #{item_name}
      - Price: #{price}
    MARKDOWN
  end
end

What's Changed

  • Add support for markdown by @eelcoj in #32
  • Add headers class method to email classes by @eelcoj in #36

Full Changelog: v0.9.0...v0.10.0