Back to vBulletin 3.5 Add-ons

Send HTML emails from adminCP
Mod Version: 1.00, by tokenyank

This modification is in the archives.
vB Version: 3.5.7 Rating: (3 votes - 5.00 average) Installs: 152
Released: 02 Nov 2005 Last Update: 25 Nov 2006 Downloads: 158
Not Supported Code Changes  

***3.6.x version of hack here***

Well, this was asked for by many people (me included ) without ever being done so I recruited some of my more knowledgable friends in php to get the syntax right for the following hack.

It is done with 2 file edits but I'm sure that it could be done with a plugin if someone ever feels the need...

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)

EDIT:
Just installed on 3.5.1 and still works with no problem... Just changing the vB version
EDIT2:
Just installed on 3.5.2 and still works with no problem... Just changing the vB version
EDIT3:
Just installed on 3.5.3 and still works with no problem... Just changing the vB version
EDIT4:
Works for 3.5.4

Download

This modification is archived and cannot be downloaded.

Screenshots

 

Similar Mods

Add-On Releases Send HTML emails from adminCP vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024