More "vBulletin style" coded (hardened security by using $vbulletin->GPC) version of the same modification
In admincp/email.php find (line 62):
Code:
'message' => TYPE_STR,
After add:
Code:
'sendhtml' => TYPE_BOOL,
Find (line 253):
Code:
construct_hidden_code('perpage', $vbulletin->GPC['perpage']);
After add:
Code:
construct_hidden_code('sendhtml', $vbulletin->GPC['sendhtml']);
Find (line 286)
Code:
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);
After add:
Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0);
In includes/class_mail.php find (line 249):
Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
replace with:
Code:
if ($vbulletin->GPC['sendhtml'])
{
$headers .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}
else
{
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}