Skip to content

Conversation

zacholauson
Copy link
Contributor

Tested against: 1.8.7, 1.9.3, 2.1.5, and 2.2.0

Here is how it looks when an email gets delivered:
screen shot 2015-02-20 at 2 47 01 pm

@carsonreinke
Copy link
Contributor

@zacholauson Cool, but maybe this should use Logger instead and option to pass in.

@zacholauson
Copy link
Contributor Author

Good point @carsonreinke, not sure why I didn't think of using Logger. I'll update this later today.

@bf4
Copy link
Contributor

bf4 commented Feb 20, 2015

I don't think this is a feature in the gem that I'd want to maintain. @jeremy @mikel ?

@zacholauson
Copy link
Contributor Author

@bf4 could you elaborate as to what you think would be difficult to maintain? Is there something you'd like to see changed in the code?

@zacholauson
Copy link
Contributor Author

Fixed merge conflicts.

@bf4
Copy link
Contributor

bf4 commented Mar 30, 2015

@jeremy @mikel @grosser @jeremyevans thoughts on having a STDOUT delivery method baked in, and the implementation?

@jeremyevans
Copy link
Contributor

I think a STDOUT or a logger delivery method is fine, but the current name is misleading. This is currently a Logger delivery method, which just happens to have a default logger which logs to STDOUT.

I think this facility should it should probably be renamed (delivery_method = :logger), or the implementation be changed to something like $stdout.puts mail.encoded. Of the two, I prefer the former, as it is more flexible.

In terms of the implementation, this creates an unused Logger instances if the user passes in their own logger. It would be best to try to avoid that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks more like 'change global state so that this test passes', whatever test unsets them should clean them up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is from every other delivery method spec except for Mail::SendMail. While it doesn't seem to be required to be in the logger spec file, if I remove it from all delivery method specs, I get intermittent failures. I'll have to look more into why this exists.

@grosser
Copy link
Contributor

grosser commented Mar 30, 2015

In rails I am used to seeing the email in the logs during development, but I assume that's rails doing stuff and not mail itself ... 👍

@zacholauson
Copy link
Contributor Author

I think a STDOUT or a logger delivery method is fine, but the current name is misleading. This is currently a Logger delivery method, which just happens to have a default logger which logs to STDOUT.

I think this facility should it should probably be renamed (delivery_method = :logger), or the implementation be changed to something like $stdout.puts mail.encoded. Of the two, I prefer the former, as it is more flexible.

I agree @jeremyevans, I'll update this to be Logger.

In terms of the implementation, this creates an unused Logger instances if the user passes in their own logger. It would be best to try to avoid that.

I didn't even think about that, thanks for catching that, I'll fix it.

@zacholauson
Copy link
Contributor Author

Fixed merge conflicts.

@zacholauson zacholauson changed the title Add STDOUT delivery method Add Logger delivery method Apr 16, 2015
@zacholauson
Copy link
Contributor Author

Fixed merge conflicts.

@zacholauson
Copy link
Contributor Author

Fixed merge conflicts.

@jeremy jeremy closed this in 61f0f01 May 15, 2017
@jeremy jeremy added this to the 2.7.0 milestone May 15, 2017
@jeremy
Copy link
Collaborator

jeremy commented May 15, 2017

Thanks @zacholauson!!

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

Successfully merging this pull request may close these issues.

6 participants