Module: Mailtrap::Mail
- Defined in:
- lib/mailtrap/mail.rb,
lib/mailtrap/mail/base.rb,
lib/mailtrap/mail/from_template.rb
Defined Under Namespace
Classes: Base, FromTemplate
Class Method Summary collapse
-
.from_message(message) ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity.
Class Method Details
.from_message(message) ⇒ Object
rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mailtrap/mail.rb', line 11 def () # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity Mailtrap::Mail::Base.new( from: prepare_address(address_list(['from'])&.addresses&.first), to: prepare_addresses(address_list(['to'])&.addresses), cc: prepare_addresses(address_list(['cc'])&.addresses), bcc: prepare_addresses(address_list(['bcc'])&.addresses), subject: .subject, text: prepare_text_part(), html: prepare_html_part(), headers: prepare_headers(), attachments: (.), category: ['category']&.unparsed_value, custom_variables: ['custom_variables']&.unparsed_value ) end |