Defect #157

URLs in emails do not use HTTPS when appropriate

Added by Mike Dalessio about 15 years ago. Updated about 15 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Affected version:

Description

My redmine installation is set up on an HTTPS site, so my team accesses via

https://x.y.com/redmine/

When issues are created or updated, the emails don't use https:// ... they use http://.

for example, text emails look like:

Issue #31 has been reported.
----------------------------------------
Feature #31: My Problem Is
http://x.y.com/redmine/issues/show/31

and the html emails look like:

Issue #31 has been reported.
<hr />
<a href="http://x.y.com/redmine/issues/show/31">Feature #31</a>:
My Problem Is

I believe this may be due to the use of url_for in views. According to the ActionMailer docs:

If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view.
Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's
why you need to jump this little hoop and supply all the details needed for the URL.

History

#1 Updated by Jean-Philippe Lang about 15 years ago

I don't know which version/revision you're using but this problem
was solved in r877 and thus in 0.6.0.

There's now a 'Protocol' setting in admin -> settings that
lets you choose if generated urls should use http or https.

If you set this setting to 'https', all links in emails will
use https instead of http.

Also available in: Atom PDF