public static function HtmlMailHelper::htmlMailIsAllowed in HTML Mail 8.3
Same name and namespace in other branches
- 8 src/Helper/HtmlMailHelper.php \Drupal\htmlmail\Helper\HtmlMailHelper::htmlMailIsAllowed()
 
Checks whether a given recipient email prefers plaintext-only messages.
Parameters
string $email: The recipient email address.
Return value
bool FALSE if the recipient prefers plaintext-only messages; otherwise TRUE.
1 call to HtmlMailHelper::htmlMailIsAllowed()
- HtmlMailSystem::format in src/
Plugin/ Mail/ HtmlMailSystem.php  - Format emails according to module settings.
 
File
- src/
Helper/ HtmlMailHelper.php, line 93  
Class
- HtmlMailHelper
 - Class HtmlMailHelper.
 
Namespace
Drupal\htmlmail\HelperCode
public static function htmlMailIsAllowed($email) {
  return !($recipient = user_load_by_mail($email)) || empty(\Drupal::service('user.data')
    ->get(self::HTMLMAIL_MODULE_NAME, $recipient
    ->id(), self::HTMLMAIL_USER_DATA_NAME));
}