Go Back    Forum > Digital Publishing / Web Sites > Website and Server Troubleshooting

LinkBack Thread Tools
04-28-2010, 08:29 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
Join Date: Jul 2003
Posts: 4,307
Thanked 655 Times in 457 Posts
Plain text has its place, but sometimes you need to send HTML email, because it's rich with images, code or links. Newsletters just look nicer when generated as HTML with a good font and layout, as opposed to a cruddy Courier or Times New Roman text-only version email.

For vBulletin 3.5, 3.6, 3.7 and 3.8, you can simply modify the files with some quick code changes, and it will add an HTML option to the "Send Email to Users" admin menu function.

This is all you have to do...

In forumURL/admincp/email.php find:
PHP Code:
print_textarea_row($vbphrase['message_email'], 'message'''1050); 
Add this directly under it:
PHP Code:
print_yes_no_row('Send HTML Email?''sendhtml'0); 
Again, in forumURL/admincp/email.php find:
PHP Code:
Add this directly under it:
PHP Code:
In forumURL/includes/class_mail.php locate:
PHP Code:
$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter
and replace with:
PHP Code:
if($_POST['sendhtml'])  {
$headers .= 'Content-Type: text/html' iif($encoding"; charset=\"$encoding\"") . $delimiter;
$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter;

Note that forumURL is whatever the URL of your site is; i.e. www.mysite.com/forum/ or forum.mysite.com/

And then admincp should be named something else; i.e., adminpanel, and password-protected, for maximum admincp security. If you've renamed it, as you should have done after your installed and secured your vBulletin site, remember to keep this in mind when reading the above instructions.

Similar instructions are found at http://www.vbulletin.org/forum/showthread.php?t=137537

I made these changes through the cpanel/Plesk control panels, as this exact code is not accessible through the admincp's style manager. These are vBulletin core file changes, not style/theme changes.

Not plugin required. In fact, this code change works better than available plugins and mods!

Easy fix.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing JVC DVD recorder LOADING? Or will not recognize DVDs? via Email or PM Video Hardware Repair 14 09-24-2020 07:35 AM
Third-party/generic/compatible camera accessories? admin Photo Cameras: Buying & Shooting 0 03-17-2009 03:04 AM
Acutal size with "record cropped video" ? jlietz Capture, Record, Transfer 3 03-03-2005 11:41 PM

Thread Tools

All times are GMT -5. The time now is 01:22 PM