[REQ] - Send HTML emails from AdminCP

Send HTML emails from adminCP

Step 1:
In admincp/email.php find:

Code:
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);

Directly below it place:
Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0);



Step 2:
In admincp/email.php find:

Code:
construct_hidden_code('test', $vbulletin->GPC['test']);

Directly below it place:

Code:
construct_hidden_code('sendhtml', $_POST['sendhtml']);



Step 3:
In includes/class_mail.php find:

Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;

and replace with:
Code:
if($_POST['sendhtml'])  {
  $headers .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}else{
  $headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}
Special thanks goes to non vB users Darryn, Pink, DO, and Dang for the helping me with syntax and pointing me in the right direction to get this done.

(you may modify this hack at will... No permission needs to be granted)
 
Back
Top