Author Topic: How to send html mail in vbulletin 4 admin CP  (Read 12244 times)

Anay

  • Newbie
  • *
  • Posts: 32
How to send html mail in vbulletin 4 admin CP
« on: December 24, 2011, 03:53:58 PM »
Hi

There is no option to send mass mail or newsletter to vbulletin users in html format but my company want it to send it html format.
I have vbulletin 4.0.9 and there is option to enable this.

I search vbulletin.org and there is no way to do it for vbulletin 4 but they have mods for vbulletin 3 series. Anyone knows how can that be done in vb4 . I don't want plain text email but want html email.

Thnx friends. ..

Savera

  • Full Member
  • ***
  • Posts: 159
Re: How to send html mail in vbulletin 4 admin CP
« Reply #1 on: March 02, 2012, 05:18:28 AM »
You need to make some changes in vbulletin files and then you can send mail in html also.

Please follow these steps I found useful :

Step 1:
In admincp/email.php

find:
 
Code: [Select]
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);
Add after it :
Code: [Select]
print_yes_no_row('Send HTML Email?', 'sendhtml', 0);

Step 2:
In admincp/email.php
 find:
Code: [Select]
construct_hidden_code('test', $vbulletin->GPC['test']);
After it Add:
Code: [Select]
construct_hidden_code('sendhtml', $_POST['sendhtml']);
Step 3:
In includes/class_mail.php
Find:
Code: [Select]
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
Replace it with :

Code: [Select]
if($_POST['sendhtml'])  {
  $headers .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}else{
  $headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
}


I hope that helps.

 

X

Do you know?

By participating in our community you can get free Top Level Domain for lifetime.
Know more..
Join Now!