Function __global->_form_to_email

Definitions

sources/mail_forms.php

  • Worker function for form_to_email.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: array

Parameters

Name Type Default Set Range Description
$extra_boring_fields array [] N/A N/A Fields to skip in addition to the normal skipped ones
$subject ?string Null N/A N/A The subject of the e-mail (null: from POSTed/tagged subject parameter)
$subject_prefix string Blank (empty string) N/A N/A The prefix text to the e-mail subject (blank: none)
$subject_suffix string Blank (empty string) N/A N/A The suffix text to the e-mail subject (blank: none)
$body_prefix string Blank (empty string) N/A N/A The prefix text to the e-mail body (blank: none)
$body_suffix string Blank (empty string) N/A N/A The suffix text to the e-mail body (blank: none)
$fields ?array Null N/A N/A A map of field names to field titles to transmit. (null: all POSTed fields, except certain standardised ones)
$to_email ?EMAIL Null N/A N/A E-mail address to send to (null: look from POST environment [if allowed] / staff address)
$is_via_post boolean True N/A N/A Whether $fields refers to some POSTed fields, as opposed to a direct field->value map
$store_attachments_to ?URLPATH Null N/A N/A Relative path to store uploaded attachments (null: do not store, and only return filename in $attachments array)

Return

  • A tuple: subject, message, to e-mail, to name, from e-mail, from name, attachments, body parts (if calling code wants partials instead of a single $message)
  • Type: array
  • Set: N/A
  • Range: N/A