Mailer.mail does not use :from but 'From' as the key for the from-address. #603
The from field is set to "Username <Usermail>".
This commit is contained in:
parent
02c65e87aa
commit
84a878d2a5
@ -365,7 +365,8 @@ class DmsfController < ApplicationController
|
||||
:zipped_content => zipped_content,
|
||||
:folders => selected_folders,
|
||||
:files => selected_files,
|
||||
:subject => "#{@project.name} #{l(:label_dmsf_file_plural).downcase}"
|
||||
:subject => "#{@project.name} #{l(:label_dmsf_file_plural).downcase}",
|
||||
:from => "#{User.current.name} <#{User.current.mail}>"
|
||||
}
|
||||
render :action => 'email_entries'
|
||||
rescue Exception
|
||||
|
||||
@ -61,7 +61,7 @@ class DmsfMailer < Mailer
|
||||
attachments['Documents.zip'] = { :content_type => 'application/zip', :content => zipped_content_data }
|
||||
end
|
||||
mail :to => email_params[:to], :cc => email_params[:cc],
|
||||
:subject => email_params[:subject], :from => user.mail
|
||||
:subject => email_params[:subject], 'From' => email_params[:from]
|
||||
end
|
||||
|
||||
def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice = nil)
|
||||
|
||||
@ -32,10 +32,11 @@
|
||||
<%= hidden_field_tag('email[zipped_content]', @email_params[:zipped_content]) %>
|
||||
<%= hidden_field_tag('email[folders]', @email_params[:folders].to_json) %>
|
||||
<%= hidden_field_tag('email[files]', @email_params[:files].to_json) %>
|
||||
<%= hidden_field_tag('email[from]', @email_params[:from]) %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_email_from)) %>
|
||||
<%= text_field_tag('email[from]', h(Setting.mail_from), :style => 'width: 90%;', :disabled => true) %>
|
||||
<%= text_field_tag('email[from_disabled]', @email_params[:from], :style => 'width: 90%;', :disabled => true) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('email[to]', l(:label_email_to)) %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user