aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox/app
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailbox/app')
-rw-r--r--actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb b/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
index d051dfe665..cd8b12dcde 100644
--- a/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
+++ b/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
@@ -21,8 +21,9 @@ 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[:bcc]&.include_in_headers = true
params[:mail][:attachments].to_a.each do |attachment|
- mail.add_file(filename: attachment.path, content: attachment.read)
+ mail.add_file(filename: attachment.original_filename, content: attachment.read)
end
end
end