Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
6b31827a
Commit
6b31827a
authored
9 years ago
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include display name with reply to address.
parent
4f34d363
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
app/mailers/notify.rb
app/mailers/notify.rb
+15
-2
No files found.
app/mailers/notify.rb
View file @
6b31827a
...
...
@@ -17,7 +17,7 @@ class Notify < ActionMailer::Base
helper_method
:current_user
,
:can?
default
from:
Proc
.
new
{
default_sender_address
.
format
}
default
reply_to:
Gitlab
.
config
.
gitlab
.
email_reply_to
default
reply_to:
Proc
.
new
{
default_reply_to_address
.
format
}
# Just send email with 2 seconds delay
def
self
.
delay
...
...
@@ -66,6 +66,13 @@ class Notify < ActionMailer::Base
address
end
# The default email address to send emails from
def
default_reply_to_address
address
=
Mail
::
Address
.
new
(
Gitlab
.
config
.
gitlab
.
email_reply_to
)
address
.
display_name
=
Gitlab
.
config
.
gitlab
.
email_display_name
address
end
def
can_send_from_user_email?
(
sender
)
sender_domain
=
sender
.
email
.
split
(
"@"
).
last
self
.
class
.
allowed_email_domains
.
include?
(
sender_domain
)
...
...
@@ -140,7 +147,13 @@ class Notify < ActionMailer::Base
if
reply_key
headers
[
'X-GitLab-Reply-Key'
]
=
reply_key
headers
[
'Reply-To'
]
=
Gitlab
::
ReplyByEmail
.
reply_address
(
reply_key
)
address
=
Mail
::
Address
.
new
(
Gitlab
::
ReplyByEmail
.
reply_address
(
reply_key
))
address
.
display_name
=
@project
.
name_with_namespace
headers
[
'Reply-To'
]
=
address
@reply_by_email
=
true
end
mail
(
headers
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment