Form Builder: Email

Handles the emailing of Inputfields for FormBuilderProcessor

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the FormBuilderEmail class also inherits all the methods and properties of: FormBuilderData.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
FormBuilderEmail::addFileAttachment($filename)
boolAdd a file attachment to the email (if supposed by the WireMail type being used) 
FormBuilderEmail::emailsToArray(string $str)
arrayTakes a string of email addresses (one per line), optionally including conditions, and convert them to an array of email addresses 
FormBuilderEmail::getRawFormData()
arrayGet raw form data as associative array 
FormBuilderEmail::getWireMail()
WireMailGet WireMail instance that will be used for sending 
FormBuilderEmail::send()
bool intSend the email 
FormBuilderEmail::setAllowSubjectPlaceholders(bool $allow)
NoneAllow placeholder {tags} in email subject? (default is false) 
FormBuilderEmail::setLabels(array $labels)
NoneAdd additional labels to appear in email, indexed by field/property name 
FormBuilderEmail::setMailer(string $mailerName)
NoneSet name of mailer (WireMail) module to use, or use 'WireMail' for native PHP mail() or blank for auto-detect 
FormBuilderEmail::setRawFormData(array $data)
NoneSet raw form data from associative array 
FormBuilderEmail::setSkipFieldName(string $fieldName)
$thisSet a field name that should be skipped in this email 
FormBuilderEmail::setSkipFieldType(string $fieldType)
$thisSet a field type where all fields of the type should be skipped in this email 
FormBuilderEmail::setTemplateVar(string $name, mixed $value)
$thisSet a variable to be provided to the rendering template 
FormBuilderEmail::setValues(array $values)
NoneAdd additional values to appear in email, indexed by field/property name 
FormBuilderEmail::setWireMail(WireMail $wireMail)
NoneSet WireMail instance to use 

Properties

NameReturnSummaryDefault
FormBuilderEmail::body string Body of email (HTML) 
FormBuilderEmail::from string Email address from 
FormBuilderEmail::fromName string Name from  
FormBuilderEmail::replyTo string Reply to email address 
FormBuilderEmail::subject string Subject of email 
FormBuilderEmail::to string Email address to 

Additional methods and properties

In addition to the methods and properties above, FormBuilderEmail also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.251