Back to vBulletin 3.6 Add-ons

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

This modification is in the archives.
vB Version: 3.6.7 Rating: (12 votes - 4.75 average) Installs: 110
Released: 26 Jan 2007 Last Update: Never Downloads: 562
Not Supported Code Changes  

Well, this was asked for by many people (me included ) without ever being done so things are never done for those who want but not prepared to do for themselves! Thus, a hack is borne!

This hack does what it says on the label. Having come from IPB to vB, I was surprised to see that a default "Send HTML email" from the adminCP was lacking as I used it in my IPB board for newsletters and such. This hack adds the ability to use the default email template that sends plaintext emails or, but toggling the radiobutton, will send HTML mime emails.

Unfortanatly, I am not familiar enough with vB's hooks/plugins so 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;
}

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

**Tested and works for vB versions 3.5.0 to present (3.7.1PL)**

Download

This modification is archived, downloads are still allowed.

File Type: %1$s instructions.txt (1.0 KB, 592 downloads)

Similar Mods

Send HTML emails from adminCP vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024