diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 26a06402..bcbe82c2 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -1,11 +1,11 @@ class Notify < ActionMailer::Base - default_url_options[:host] = "gitlabhq.com" - default from: "notify@gitlabhq.com" + default_url_options[:host] = EMAIL_OPTS["host"] + default from: EMAIL_OPTS["from"] def new_user_email(user, password) @user = user @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 def new_issue_email(issue) @@ -13,14 +13,14 @@ class Notify < ActionMailer::Base @project = issue.project @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 def note_wall_email(user, note) @user = user @note = note @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 def note_commit_email(user, note) @@ -28,7 +28,7 @@ class Notify < ActionMailer::Base @note = note @project = note.project @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 def note_issue_email(user, note) @@ -36,6 +36,6 @@ class Notify < ActionMailer::Base @note = note @project = note.project @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 diff --git a/config/email.yml b/config/email.yml index a763e100..b5ce1530 100644 --- a/config/email.yml +++ b/config/email.yml @@ -1 +1,2 @@ from: notify@gitlabhq.com +host: gitlabhq.com