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

Mailer Class Works, Custom Mailer class does not unfortunately #44

Closed
justindunn opened this issue Jul 12, 2018 · 6 comments
Closed

Mailer Class Works, Custom Mailer class does not unfortunately #44

justindunn opened this issue Jul 12, 2018 · 6 comments

Comments

@justindunn
Copy link

I'm working on an application that has a regular mailer.rb file in the app/mailers directory, and also has a second mailer called notification_mailer.rb, which inherits from mailer class
class NotificationMailer < Mailer
When emails are sent through the normal mailer, the css is rendered inline into the layout like it should and the html rules are applied correctly. When emails are sent through the custom notification_mailer.rb, the css does not render inline to the html and no html is rendered, and the stylesheet tag is still in the header in the source on those emails, on the ones that rendered inline they did not.

@schneems
Copy link
Member

Please provide an example app that demonstrates the issue.

cfda1413-74eb-49cd-8743-8bed83bbf413

@justindunn
Copy link
Author

I can't send the app i'm working on because of legal reasons, I can create a sample app if needed still, but I think I've traced my problem maybe to premailer, since its the css that is not working correctly

@schneems
Copy link
Member

schneems commented Jul 12, 2018 via email

@justindunn
Copy link
Author

Ok I've got 2 mailer classes:
class Mailer < Company::Mailer
class NotificationMailer < Mailer
and then application_mailer.rb


# Top-level mailer class.
class ApplicationMailer < ActionMailer::Base
  layout 'mailer'
end```
I also have a custom mailer in lib lib/company/mailer.rb

```class WeCounsel::Mailer < ApplicationMailer```

my layout is in app/views/layouts/mailer.md.erb and app/views/layouts/mailer.text.erb

@schneems
Copy link
Member

I appreciate the issue, and I know i'm asking you to go to the extra mile, but I also own 52 published gems and it takes a LOT of time and effort every time I need to debug an issue. The one thing that helps speed up getting it fixed (if possible) is an app that works out of the box that shows the issue at hand.

I need an example app, please. An app that is an example of what is going wrong with directions on how to run it.

@schneems
Copy link
Member

schneems commented Oct 2, 2019

Closing for now if you have an example app let me know and we can come back to it https://www.codetriage.com/example_app

@schneems schneems closed this as completed Oct 2, 2019
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

2 participants