Class: Courrier::Email::Providers::Inbox
- Inherits:
-
Base
- Object
- Base
- Courrier::Email::Providers::Inbox
- Defined in:
- lib/courrier/email/providers/inbox.rb
Defined Under Namespace
Classes: Email
Instance Method Summary collapse
Instance Method Details
#deliver ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/courrier/email/providers/inbox.rb', line 11 def deliver FileUtils.mkdir_p(config.destination) file_path = File.join(config.destination, "#{Time.now.to_i}.html") File.write(file_path, ERB.new(File.read(config.template_path)).result(binding)) Launchy.open(file_path) if config.auto_open "📮 Email saved to #{file_path} and #{email_destination}" end |
#email ⇒ Object
25 |
# File 'lib/courrier/email/providers/inbox.rb', line 25 def email = extract(@options.to)[:email] |
#html ⇒ Object
29 |
# File 'lib/courrier/email/providers/inbox.rb', line 29 def html = prepare(@options.html) |
#name ⇒ Object
23 |
# File 'lib/courrier/email/providers/inbox.rb', line 23 def name = extract(@options.to)[:name] |
#text ⇒ Object
27 |
# File 'lib/courrier/email/providers/inbox.rb', line 27 def text = prepare(@options.text) |