Commit 9b3fabcc9a56fbf1840d04bf3dd42bc693317ec9
1 parent
a8e4fb61
Exists in
master
and in
4 other branches
mail host url to email.yml
Showing
2 changed files
with
8 additions
and
7 deletions
Show diff stats
app/mailers/notify.rb
| 1 | class Notify < ActionMailer::Base | 1 | class Notify < ActionMailer::Base |
| 2 | - default_url_options[:host] = "gitlabhq.com" | ||
| 3 | - default from: "notify@gitlabhq.com" | 2 | + default_url_options[:host] = EMAIL_OPTS["host"] |
| 3 | + default from: EMAIL_OPTS["from"] | ||
| 4 | 4 | ||
| 5 | def new_user_email(user, password) | 5 | def new_user_email(user, password) |
| 6 | @user = user | 6 | @user = user |
| 7 | @password = password | 7 | @password = password |
| 8 | - mail(:to => @user.email, :subject => "gitlab | Account was created for you", :from => EMAIL_OPTS["from"]) | 8 | + mail(:to => @user.email, :subject => "gitlab | Account was created for you") |
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | def new_issue_email(issue) | 11 | def new_issue_email(issue) |
| @@ -13,14 +13,14 @@ class Notify < ActionMailer::Base | @@ -13,14 +13,14 @@ class Notify < ActionMailer::Base | ||
| 13 | @project = issue.project | 13 | @project = issue.project |
| 14 | @issue = issue | 14 | @issue = issue |
| 15 | 15 | ||
| 16 | - mail(:to => @user.email, :subject => "gitlab | New Issue was created", :from => EMAIL_OPTS["from"]) | 16 | + mail(:to => @user.email, :subject => "gitlab | New Issue was created") |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | def note_wall_email(user, note) | 19 | def note_wall_email(user, note) |
| 20 | @user = user | 20 | @user = user |
| 21 | @note = note | 21 | @note = note |
| 22 | @project = note.project | 22 | @project = note.project |
| 23 | - mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ", :from => EMAIL_OPTS["from"]) | 23 | + mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ") |
| 24 | end | 24 | end |
| 25 | 25 | ||
| 26 | def note_commit_email(user, note) | 26 | def note_commit_email(user, note) |
| @@ -28,7 +28,7 @@ class Notify < ActionMailer::Base | @@ -28,7 +28,7 @@ class Notify < ActionMailer::Base | ||
| 28 | @note = note | 28 | @note = note |
| 29 | @project = note.project | 29 | @project = note.project |
| 30 | @commit = @project.repo.commits(note.noteable_id).first | 30 | @commit = @project.repo.commits(note.noteable_id).first |
| 31 | - mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ", :from => EMAIL_OPTS["from"]) | 31 | + mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ") |
| 32 | end | 32 | end |
| 33 | 33 | ||
| 34 | def note_issue_email(user, note) | 34 | def note_issue_email(user, note) |
| @@ -36,6 +36,6 @@ class Notify < ActionMailer::Base | @@ -36,6 +36,6 @@ class Notify < ActionMailer::Base | ||
| 36 | @note = note | 36 | @note = note |
| 37 | @project = note.project | 37 | @project = note.project |
| 38 | @issue = note.noteable | 38 | @issue = note.noteable |
| 39 | - mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ", :from => EMAIL_OPTS["from"]) | 39 | + mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ") |
| 40 | end | 40 | end |
| 41 | end | 41 | end |
config/email.yml