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

Fixed mailing issue in redmine 4.0.0 #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LaurensRietveld
Copy link

This solves #67

Disclaimer: not a ruby developer ;)

@@ -6,10 +6,12 @@ class MentionMailer < ActionMailer::Base
include ApplicationHelper

def self.default_url_options
Mailer.default_url_options
h = Setting.host_name
h = h.to_s.gsub(%r{\/.*$}, '') unless Redmine::Utils.relative_url_root.blank?
Copy link

Choose a reason for hiding this comment

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

What does this regexp do? For me it was enough to just pass Setting.host_name to :host

@keysen
Copy link

keysen commented Mar 26, 2019

No this fix is so complicated.

A better one could be to replace app/models/mention_mailer.rb:9

# from:
Mailer.default_url_options 
# to:
::Mailer.default_url_options

Then it's working ^^

The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class.

@shahriar-sdet
Copy link

No this fix is so complicated.

A better one could be to replace app/models/mention_mailer.rb:9

# from:
Mailer.default_url_options 
# to:
::Mailer.default_url_options

Then it's working ^^

The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class.

Thanks, man! its working

@tainewoo
Copy link

No this fix is so complicated.

A better one could be to replace app/models/mention_mailer.rb:9

from:

Mailer.default_url_options

to:

::Mailer.default_url_options

Then it's working ^^

The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class.

Yes it works for me too.

@gsancewicz
Copy link

gsancewicz commented Jul 31, 2019

@keysen

No this fix is so complicated.

A better one could be to replace app/models/mention_mailer.rb:9

# from:
Mailer.default_url_options 
# to:
::Mailer.default_url_options

Then it's working ^^

The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class.

Maybe you should add this as pull request. This fix works for us too.

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