public function send()
{
$aEmailOptions = $this->aEmailOptions;
$aInput = $this->aInput;
$sSubmitSectionID = $this->sSubmitSectionID;
if ($_bIsHTML = $this->_getEmailArgument($aInput, $aEmailOptions, 'is_html', $sSubmitSectionID)) {
add_filter('wp_mail_content_type', array($this, '_replyToSetMailContentTypeToHTML'));
}
if ($this->_sEmailSenderAddress = $this->_getEmailArgument($aInput, $aEmailOptions, 'from', $sSubmitSectionID)) {
add_filter('wp_mail_from', array($this, '_replyToSetEmailSenderAddress'));
}
if ($this->_sEmailSenderName = $this->_getEmailArgument($aInput, $aEmailOptions, 'name', $sSubmitSectionID)) {
add_filter('wp_mail_from_name', array($this, '_replyToSetEmailSenderAddress'));
}
$_bSent = wp_mail($this->_getEmailArgument($aInput, $aEmailOptions, 'to', $sSubmitSectionID), $this->_getEmailArgument($aInput, $aEmailOptions, 'subject', $sSubmitSectionID), $_bIsHTML ? $this->getReadableListOfArrayAsHTML((array) $this->_getEmailArgument($aInput, $aEmailOptions, 'message', $sSubmitSectionID)) : $this->getReadableListOfArray((array) $this->_getEmailArgument($aInput, $aEmailOptions, 'message', $sSubmitSectionID)), $this->_getEmailArgument($aInput, $aEmailOptions, 'headers', $sSubmitSectionID), $this->_formatAttachements($this->_getEmailArgument($aInput, $aEmailOptions, 'attachments', $sSubmitSectionID)));
remove_filter('wp_mail_content_type', array($this, '_replyToSetMailContentTypeToHTML'));
remove_filter('wp_mail_from', array($this, '_replyToSetEmailSenderAddress'));
remove_filter('wp_mail_from_name', array($this, '_replyToSetEmailSenderAddress'));
foreach ($this->_aPathsToDelete as $_sPath) {
unlink($_sPath);
}
return $_bSent;
}