PDA

View Full Version : Administrative and Maintenance Tools - Send HTML email via adminCP


tokenyank
05-15-2008, 10:00 PM
*** This is the same hack in the 3.5.x and 3.6.x sections, just thought I'd add it here too to keep continuity and to allow easier searching should someone need this functionality ***

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:

print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);

Directly below it place:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0);

Step 2:
In admincp/email.php find:

construct_hidden_code('test', $vbulletin->GPC['test']);

Directly below it place:
construct_hidden_code('sendhtml', $_POST['sendhtml']);

Step 3:
In includes/class_mail.php find:

$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;

and replace with:
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)**

veenuisthebest
05-16-2008, 01:33 AM
it works perfect !! :up: although the file edits are minor but still it would be amazing if such feature comes as a plugin with a WYSIWYG editor interface and option for storing newsletters in database and even display them on a separate page for public viewing.

I wonder, why vB doesn't has it ??

tokenyank
05-16-2008, 05:13 AM
There are things like Commbull (http://www.octanedev.com/commbull.php) (is this still being developed?) and GAZ (http://www.thevbgeek.com/geeki/index.php/Category:GAZ) for very robust newsletter handling...

What this does is literally for those of us who just need to send HTML via the adminCP.

But, I do agree that with the size of some vB communities and the knowledge that most sites send out a newsletter of some description that there hasn't been some sort of addon to facilitate this from vB. Seems like missed market share as anyone who desperately needs a newsletter solution has to spend several hundred dollars to use Sendstudio or Oempro.

Oh well, in the mean time, I'm here! ;)

Trana
05-16-2008, 07:52 AM
Any chance of this using no file edits in the future?

tokenyank
05-16-2008, 09:55 AM
Any chance of this using no file edits in the future?

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...

So, erm... No, not from me and I think it hasn't been done already is because the required hooks aren't where they need to be for this to be made into a plugin.

myown
05-21-2008, 05:00 AM
tagged ...

urdu
05-24-2008, 01:10 PM
thanks

Dragon Company
05-24-2008, 01:16 PM
Thanks a lot :)

uberjon
06-10-2008, 10:51 PM
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.

came from IPB too. yea i was wondering to myself (searched here to check) "does it auto parse html?" the help file makes no mention of it!

great feature stock or aftermarket. well needed. *installed*

goranbaxy
07-01-2008, 11:49 AM
on evry VB update I have to do this edits agan :(

elmati
07-01-2008, 01:07 PM
nice :)
thanks for this, m8 :)

PoetJA-1975
07-08-2008, 03:56 AM
Wonderful! Thanx for the share ;)

Jacquii.

Q-v-n-s-Q
07-08-2008, 09:11 AM
cool mod, thank you for this mod.

t.uzuner
07-13-2008, 09:55 AM
vert very thanks friends bravooo

TheCatcher
09-15-2008, 12:06 AM
thanks

Dederon
09-16-2008, 06:14 PM
THANK YOU - i works great!!! I hope vBulletin will include it in their Software.. soon!

vwdforum
09-21-2008, 06:52 PM
I use this one, much easier https://vborg.vbsupport.ru/showthread.php?t=172026&highlight=html+auto+email&page=2

walhan
09-26-2008, 02:16 PM
thanks!

forsanelhaq
09-29-2008, 01:49 AM
any one test it with 3.7

Evil Chris
11-06-2008, 06:09 PM
thanks... each time I upgrade my board I have to install this one.

Scalemotorcars
11-13-2008, 06:19 PM
Works perfectly. Thanks :up:

raja811
11-14-2008, 08:32 AM
nice

puregraf
12-03-2008, 10:34 PM
the best!

darkdiver
01-24-2009, 07:56 PM
some feedback for 3.8 ? Is it working ?

eric

EagleNick
04-01-2009, 07:26 PM
Still works fine on 3.8.2 :)

Bieberpelz
05-14-2009, 10:59 AM
I installed this mod in 2 minutes and it runs perfekt.

thanks a lot :)

3.8.2 i use

Faizan
09-08-2009, 08:34 PM
WoW Really SuperB Dude...Works Perfectly On 3.8.3

Thulasi
12-03-2009, 10:39 PM
Hi

I have modified the code as per instructions.
It throws "parse error: in email.php" when I open "Send Mail to users" in ACP.
Checked the code twice but no use.
BTW, it is 3.8.4.

Appreciate your suggestions.
Thanks.

BoYagoob
10-29-2010, 03:47 PM
thanks.

Satfool1
07-08-2011, 09:50 PM
Working well o 4.1.4

This is great stuff and i used it in all versions since it came out and allways good

walter_ps2
07-29-2011, 02:04 PM
no, it doesnt work on VB4, i have the flag for HTML but i dont have the message box, only the object box.

dizzynation
01-27-2012, 05:55 AM
does this work on 3.8.7 ?