This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " .vimrc | |
| " | |
| " Artem Chistyakov <[email protected]> | |
| " | |
| " Remember that: | |
| " Reload .vimrc without restarting Vim | |
| " :source % | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'tmail' | |
| require 'postmark' | |
| module Mailer | |
| class PostmarkTransport | |
| attr_accessor :content_type | |
| def initialize(api_key) | |
| Postmark.api_key= api_key | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| post '/contact' do | |
| subject = params[:title] | |
| body = erb :email, :layout => false | |
| begin | |
| transport = Mailer::PostmarkTransport.new(POSTMARK_API_KEY) | |
| transport.send_message(SENDER, RECIPIENT, subject, body) do |message| | |
| message.tag = "contact-form" | |
| end | |
| rescue ArgumentError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " .vimrc | |
| " | |
| " Artem Chistyakov <[email protected]> | |
| " | |
| " Remember that: | |
| " Reload .vimrc without restarting Vim | |
| " :source % | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
NewerOlder