digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Website and Server Troubleshooting (https://www.digitalfaq.com/forum/web-tech/)
-   -   Code edits to send HTML email via admincp in vBulletin (https://www.digitalfaq.com/forum/web-tech/2925-code-edits-send.html)

admin 03-06-2011 08:14 PM

Code edits to send HTML email via admincp in vBulletin
 
This works on vBulletin 3.7.x and 3.8.x

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;
}



All times are GMT -5. The time now is 05:39 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.