Commit 9b3fabcc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

mail host url to email.yml

parent a8e4fb61
class Notify < ActionMailer::Base class Notify < ActionMailer::Base
default_url_options[:host] = "gitlabhq.com" default_url_options[:host] = EMAIL_OPTS["host"]
default from: "notify@gitlabhq.com" default from: EMAIL_OPTS["from"]
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", :from => EMAIL_OPTS["from"]) mail(:to => @user.email, :subject => "gitlab | Account was created for you")
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", :from => EMAIL_OPTS["from"]) mail(:to => @user.email, :subject => "gitlab | New Issue was created")
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} ", :from => EMAIL_OPTS["from"]) mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
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} ", :from => EMAIL_OPTS["from"]) mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
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} ", :from => EMAIL_OPTS["from"]) mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
end end
end end
from: notify@gitlabhq.com from: notify@gitlabhq.com
host: gitlabhq.com
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment