Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delivery Method #6

Closed
jodosha opened this issue Jun 29, 2015 · 1 comment
Closed

Delivery Method #6

jodosha opened this issue Jun 29, 2015 · 1 comment
Milestone

Comments

@jodosha
Copy link
Member

jodosha commented Jun 29, 2015

Let developers to specify a global delivery method.
This is done via the framework configuration (#1 ).

Lotus::Mailer.configure do
  # ...
  delivery_method :sendmail

  # or
  delivery_method :smtp, address: "localhost", port: 1025

  # or
  delivery :test

  # or
  delivery_method MyCustomDeliveryMethod, foo: 'bar'
end

Lotus::Mailer will depend on mail gem. This library already supports this scenario.
Our goal is to store that settings and to pass them at the single mail instance, that we're gonna to deliver.

In other words, we MUST avoid this:

Mail.defaults do
  delivery_method :smtp, address: "localhost", port: 1025
end

In favor of this:

mail = Mail.new
mail.delivery_method Lotus::Mailer.configuration.delivery_method
@jodosha jodosha added this to the v0.1.0 milestone Jun 29, 2015
@rosafaria
Copy link
Contributor

Should the delivery method be the same for all mailers?

inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
Simple implementation of multipart rendering (hanami#4)

Update associate and rendering template tests

Add delivery method to configuration

Correction of delivery method to be compatible with the Mail gem

Updaye docummentation of delivery_method method

Code clean up

Code clean up

Minor fixes

Update mailer.rb

Update configuration.rb

Update dsl.rb

Delete inheritable.rb

Fix templates attribution in templates method

Code clean up

Update mailer_test.rb

Code clean up

Update associate and rendering template tests

Test against JRuby 9000

Mailer Delivery DSL (Issue hanami#3)

Update mailer_test.rb

Code clean up

Fix templates attribution in templates method

Code clean up

Removed unused else condition.
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
Correction of delivery method to be compatible with the Mail gem

Updaye docummentation of delivery_method method

Code clean up

Delivery Method Implementation (hanami#6)
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
Correction of delivery method to be compatible with the Mail gem

Updaye docummentation of delivery_method method

Code clean up

Delivery Method Implementation (hanami#6)
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 18, 2015
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 24, 2015
inescoelho added a commit to DEIGirls/mailer that referenced this issue Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants