Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to deliver inbound emails by source (#38849)
* Add a way to deliver inbound emails by source Great for testing when you get an eml file and can just paste it in. * Test updates * Fix tests * Fix spacing
- Loading branch information
Showing
7 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ilbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Rails | ||
class Conductor::ActionMailbox::InboundEmails::SourcesController < Rails::Conductor::BaseController | ||
def new | ||
end | ||
|
||
def create | ||
inbound_email = ActionMailbox::InboundEmail.create_and_extract_message_id! params[:source] | ||
redirect_to main_app.rails_conductor_inbound_email_url(inbound_email) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/sources/new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<% provide :title, "Deliver new inbound email by source" %> | ||
|
||
<h1>Deliver new inbound email by source</h1> | ||
|
||
<%= form_with(url: main_app.rails_conductor_inbound_email_sources_path, local: true) do |form| %> | ||
<div> | ||
<%= form.label :source, "Source" %><br> | ||
<%= form.text_area :source, size: "80x60" %> | ||
</div> | ||
|
||
<%= form.submit "Deliver inbound email" %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters