mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add option to set X-Original-To for systems that route on envelope addressing
This commit is contained in:
parent
67467125af
commit
666947089d
2 changed files with 6 additions and 1 deletions
|
@ -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 a new issue