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
iv
gitlab-ce
Commits
81a5a971
Commit
81a5a971
authored
Mar 25, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to configure Reply-To address in gitlab.yml
Closes #1305
parent
2a0d38c0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+1
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+8
-0
No files found.
CHANGELOG
View file @
81a5a971
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.10.0 (unreleased)
v 7.10.0 (unreleased)
- Add ability to configure Reply-To address in gitlab.yml (Stan Hu)
- Fix broken side-by-side diff view on merge request page (Stan Hu)
- Fix broken side-by-side diff view on merge request page (Stan Hu)
- Set Application controller default URL options to ensure all url_for calls are consistent (Stan Hu)
- Set Application controller default URL options to ensure all url_for calls are consistent (Stan Hu)
- Allow HTML tags in Markdown input
- Allow HTML tags in Markdown input
...
...
app/mailers/notify.rb
View file @
81a5a971
...
@@ -19,7 +19,7 @@ class Notify < ActionMailer::Base
...
@@ -19,7 +19,7 @@ class Notify < ActionMailer::Base
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default
from:
Proc
.
new
{
default_sender_address
.
format
}
default
from:
Proc
.
new
{
default_sender_address
.
format
}
default
reply_to:
"noreply@
#{
Gitlab
.
config
.
gitlab
.
host
}
"
default
reply_to:
Gitlab
.
config
.
gitlab
.
email_reply_to
# Just send email with 2 seconds delay
# Just send email with 2 seconds delay
def
self
.
delay
def
self
.
delay
...
...
config/gitlab.yml.example
View file @
81a5a971
...
@@ -49,6 +49,7 @@ production: &base
...
@@ -49,6 +49,7 @@ production: &base
# Email address used in the "From" field in mails sent by GitLab
# Email address used in the "From" field in mails sent by GitLab
email_from: example@example.com
email_from: example@example.com
email_display_name: GitLab
email_display_name: GitLab
email_reply_to: noreply@example.com
# Email server smtp settings are in config/initializers/smtp_settings.rb.sample
# Email server smtp settings are in config/initializers/smtp_settings.rb.sample
...
...
config/initializers/1_settings.rb
View file @
81a5a971
...
@@ -103,6 +103,7 @@ Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
...
@@ -103,6 +103,7 @@ Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
Settings
.
gitlab
[
'email_enabled'
]
||=
true
if
Settings
.
gitlab
[
'email_enabled'
].
nil?
Settings
.
gitlab
[
'email_enabled'
]
||=
true
if
Settings
.
gitlab
[
'email_enabled'
].
nil?
Settings
.
gitlab
[
'email_from'
]
||=
"gitlab@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'email_from'
]
||=
"gitlab@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'email_display_name'
]
||=
"GitLab"
Settings
.
gitlab
[
'email_display_name'
]
||=
"GitLab"
Settings
.
gitlab
[
'email_reply_to'
]
||=
"noreply@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_url
)
Settings
.
gitlab
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_url
)
Settings
.
gitlab
[
'user'
]
||=
'git'
Settings
.
gitlab
[
'user'
]
||=
'git'
Settings
.
gitlab
[
'user_home'
]
||=
begin
Settings
.
gitlab
[
'user_home'
]
||=
begin
...
...
spec/mailers/notify_spec.rb
View file @
81a5a971
...
@@ -7,9 +7,12 @@ describe Notify do
...
@@ -7,9 +7,12 @@ describe Notify do
let
(
:gitlab_sender_display_name
)
{
Gitlab
.
config
.
gitlab
.
email_display_name
}
let
(
:gitlab_sender_display_name
)
{
Gitlab
.
config
.
gitlab
.
email_display_name
}
let
(
:gitlab_sender
)
{
Gitlab
.
config
.
gitlab
.
email_from
}
let
(
:gitlab_sender
)
{
Gitlab
.
config
.
gitlab
.
email_from
}
let
(
:gitlab_sender_reply_to
)
{
Gitlab
.
config
.
gitlab
.
email_reply_to
}
let
(
:recipient
)
{
create
(
:user
,
email:
'recipient@example.com'
)
}
let
(
:recipient
)
{
create
(
:user
,
email:
'recipient@example.com'
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
around
(
:each
)
{
ActionMailer
::
Base
.
deliveries
.
clear
}
before
(
:each
)
do
before
(
:each
)
do
email
=
recipient
.
emails
.
create
(
email:
"notifications@example.com"
)
email
=
recipient
.
emails
.
create
(
email:
"notifications@example.com"
)
recipient
.
update_attribute
(
:notification_email
,
email
.
email
)
recipient
.
update_attribute
(
:notification_email
,
email
.
email
)
...
@@ -27,6 +30,11 @@ describe Notify do
...
@@ -27,6 +30,11 @@ describe Notify do
expect
(
sender
.
display_name
).
to
eq
(
gitlab_sender_display_name
)
expect
(
sender
.
display_name
).
to
eq
(
gitlab_sender_display_name
)
expect
(
sender
.
address
).
to
eq
(
gitlab_sender
)
expect
(
sender
.
address
).
to
eq
(
gitlab_sender
)
end
end
it
'has a Reply-To address'
do
reply_to
=
subject
.
header
[
:reply_to
].
addresses
expect
(
reply_to
).
to
eq
([
gitlab_sender_reply_to
])
end
end
end
shared_examples
'an email starting a new thread'
do
|
message_id_prefix
|
shared_examples
'an email starting a new thread'
do
|
message_id_prefix
|
...
...
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