Tool to build mailto links using static email bodies pulled from a YAML config file.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install freya
Create a yml file containing the bodies of your emails.
test: email: This is a test email
Then you create a link to this email like this:
mail_to Freya::Email.new(name:'test.email', to: 'email@example.com', subject: 'test_subject).link, 'Email'
You can access mail bodies using the
name attribute separating nodes with points.
You can also create your own email class and use
base_bcc to provide emails that have to be added to every cc and bcc of that subtype
class TeamMemberEmail < :: def subject 'Team email' end def name 'team.email' end def base_cc ['firstname.lastname@example.org'] end end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request