You are here

function htmlmail_is_allowed in HTML Mail 7.2

Same name and namespace in other branches
  1. 8.2 htmlmail.module \htmlmail_is_allowed()
  2. 6.2 htmlmail.module \htmlmail_is_allowed()

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 htmlmail_is_allowed()
HTMLMailSystem::format in ./htmlmail.mail.inc
Format emails according to module settings.

File

./htmlmail.module, line 246
Sends system emails in HTML.

Code

function htmlmail_is_allowed($email) {
  return !($recipient = user_load_by_mail($email)) || empty($recipient->data['htmlmail_plaintext']);
}