protected static function HTMLMailMime::successful in HTML Mail 8
Same name and namespace in other branches
- 8.3 src/Utility/HtmlMailMime.php \Drupal\htmlmail\Utility\HtmlMailMime::successful()
Routes PEAR_Error objects to logger.
Passes PEAR_Error objects to logger, and returns FALSE.
Parameters
object $data: The result of another function that may return a PEAR_Error object.
Return value
bool FALSE if $data is a PEAR_Error object; otherwise $data.
9 calls to HTMLMailMime::successful()
- HTMLMailMime::addAttachment in src/Utility/ HTMLMailMime.php 
- Adds a file to the list of attachments.
- HTMLMailMime::addHtmlImage in src/Utility/ HTMLMailMime.php 
- Adds an image to the list of embedded images.
- HTMLMailMime::get in src/Utility/ HTMLMailMime.php 
- Builds and returns the full multipart message with all its parts.
- HTMLMailMime::getMessage in src/Utility/ HTMLMailMime.php 
- Returns the complete e-mail, ready to send.
- HTMLMailMime::parse in src/Utility/ HTMLMailMime.php 
- Parse a complete message and return a MailMIME object.
File
- src/Utility/ HTMLMailMime.php, line 104 
- Provides the MailMIME class for creating MIME-formatted email messages.
Class
- HTMLMailMime
- Class HTMLMailMime.
Namespace
Drupal\htmlmail\UtilityCode
protected static function &successful(&$data) {
  if (\PEAR::isError($data)) {
    self::getLogger()
      ->error('<a href=":pear_error">PEAR error: @error</a>', [
      ':pear_error' => 'http://pear.php.net/manual/core.pear.pear.iserror.php',
      '@error' => $data
        ->toString(),
    ]);
    $data = FALSE;
  }
  return $data;
}