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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
d61268e4
Commit
d61268e4
authored
Nov 22, 2011
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#169] – Move email 'from' & 'host' settings to config file
parent
a4fbe13f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
app/mailers/notify.rb
app/mailers/notify.rb
+5
-5
config/email.yml
config/email.yml
+1
-0
config/initializers/load_config.rb
config/initializers/load_config.rb
+1
-0
No files found.
app/mailers/notify.rb
View file @
d61268e4
...
@@ -5,7 +5,7 @@ class Notify < ActionMailer::Base
...
@@ -5,7 +5,7 @@ class Notify < ActionMailer::Base
def
new_user_email
(
user
,
password
)
def
new_user_email
(
user
,
password
)
@user
=
user
@user
=
user
@password
=
password
@password
=
password
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | Account was created for you"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | Account was created for you"
,
:from
=>
EMAIL_OPTS
[
"from"
]
)
end
end
def
new_issue_email
(
issue
)
def
new_issue_email
(
issue
)
...
@@ -13,14 +13,14 @@ class Notify < ActionMailer::Base
...
@@ -13,14 +13,14 @@ class Notify < ActionMailer::Base
@project
=
issue
.
project
@project
=
issue
.
project
@issue
=
issue
@issue
=
issue
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | New Issue was created"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | New Issue was created"
,
:from
=>
EMAIL_OPTS
[
"from"
]
)
end
end
def
note_wall_email
(
user
,
note
)
def
note_wall_email
(
user
,
note
)
@user
=
user
@user
=
user
@note
=
note
@note
=
note
@project
=
note
.
project
@project
=
note
.
project
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
,
:from
=>
EMAIL_OPTS
[
"from"
]
)
end
end
def
note_commit_email
(
user
,
note
)
def
note_commit_email
(
user
,
note
)
...
@@ -28,7 +28,7 @@ class Notify < ActionMailer::Base
...
@@ -28,7 +28,7 @@ class Notify < ActionMailer::Base
@note
=
note
@note
=
note
@project
=
note
.
project
@project
=
note
.
project
@commit
=
@project
.
repo
.
commits
(
note
.
noteable_id
).
first
@commit
=
@project
.
repo
.
commits
(
note
.
noteable_id
).
first
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
,
:from
=>
EMAIL_OPTS
[
"from"
]
)
end
end
def
note_issue_email
(
user
,
note
)
def
note_issue_email
(
user
,
note
)
...
@@ -36,6 +36,6 @@ class Notify < ActionMailer::Base
...
@@ -36,6 +36,6 @@ class Notify < ActionMailer::Base
@note
=
note
@note
=
note
@project
=
note
.
project
@project
=
note
.
project
@issue
=
note
.
noteable
@issue
=
note
.
noteable
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
,
:from
=>
EMAIL_OPTS
[
"from"
]
)
end
end
end
end
config/email.yml
0 → 100644
View file @
d61268e4
from
:
notify@gitlabhq.com
config/initializers/load_config.rb
View file @
d61268e4
GITOSIS
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/config/gitosis.yml"
)
GITOSIS
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/config/gitosis.yml"
)
EMAIL_OPTS
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/config/email.yml"
)
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