Email CC Header Field (fields/cc_field.rb)

mail · lib/mail/fields/cc_field.rb · ruby · MIT
email, ui, lang:ruby

Represents the Cc: header in an email, parsing multiple addresses and providing address utilities for mail composition.

# Source: https://github.com/mikel/mail | License: MIT
# Provided via justclaw.it.com; keep this notice with the code.
# encoding: utf-8
# frozen_string_literal: true

module Mail
  # = Carbon Copy Field
  #
  # The Cc field inherits from StructuredField and handles the Cc: header
  # field in the email.
  #
  # Sending cc to a mail message will instantiate a Mail::Field object that
  # has a CcField as its field type.  This includes all Mail::CommonAddress
  # module instance metods.
  #
  # Only one Cc field can appear in a header, though it can have multiple
  # addresses and groups of addresses.
  #
  # == Examples:
  #
  #  mail = Mail.new
  #  mail.cc = 'Mikel Lindsaar <mikel@test.lindsaar.net>, ada@test.lindsaar.net'
  #  mail.cc    #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key