instance method create_inbound_email_from_mail

Ruby on Rails 6.0.6

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

create_inbound_email_from_mail(status: :processing, **mail_options)

Create an InboundEmail by specifying it using Mail.new options. Example:

create_inbound_email_from_mail(from: "david@loudthinking.com", subject: "Hello!")

Parameters

status key = :processing
mail_options keyrest
Source
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 16
    def create_inbound_email_from_mail(status: :processing, **mail_options)
      mail = Mail.new(mail_options)
      # Bcc header is not encoded by default
      mail[:bcc].include_in_headers = true if mail[:bcc]

      create_inbound_email_from_source mail.to_s, status: status
    end

Defined in actionmailbox/lib/action_mailbox/test_helper.rb line 16 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionMailbox::TestHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close