mirror of https://github.com/rails/rails
Add option to set X-Original-To for systems that route on envelope addressing
This commit is contained in:
parent
67467125af
commit
666947089d
|
@ -20,7 +20,7 @@ module Rails
|
|||
|
||||
private
|
||||
def new_mail
|
||||
Mail.new(params.require(:mail).permit(:from, :to, :cc, :bcc, :in_reply_to, :subject, :body).to_h).tap do |mail|
|
||||
Mail.new(params.require(:mail).permit(:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body).to_h).tap do |mail|
|
||||
mail[:bcc]&.include_in_headers = true
|
||||
params[:mail][:attachments].to_a.each do |attachment|
|
||||
mail.add_file(filename: attachment.original_filename, content: attachment.read)
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
<%= form.text_field :bcc %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :x_original_to, "X-Original-To" %><br>
|
||||
<%= form.text_field :x_original_to %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :in_reply_to, "In-Reply-To" %><br>
|
||||
<%= form.text_field :in_reply_to %>
|
||||
|
|
Loading…
Reference in New Issue