![]() |
Send HTML emails from adminCP
***3.6.x version of hack here***
Well, this was asked for by many people (me included :) ) without ever being done so I recruited some of my more knowledgable friends in php to get the syntax right for the following hack. 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); Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0); In admincp/email.php find: Code:
construct_hidden_code('test', $vbulletin->GPC['test']); Code:
construct_hidden_code('sendhtml', $_POST['sendhtml']); In includes/class_mail.php find: Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; Code:
if($_POST['sendhtml']) { (you may modify this hack at will... No permission needs to be granted) EDIT: Just installed on 3.5.1 and still works with no problem... Just changing the vB version EDIT2: Just installed on 3.5.2 and still works with no problem... Just changing the vB version EDIT3: Just installed on 3.5.3 and still works with no problem... Just changing the vB version EDIT4: Works for 3.5.4 |
Thanks, I really needed this :up:
[high]* RS_Jelle clicks install :)[/high] |
Thats wicked. Do you know of a guide to writing HTML e-mails I can reference?
|
This is great. Can anyone turn this into a plugin please?
|
thank you very very much
|
Installed, thanks been looking for this for ages - well done.....
|
More "vBulletin style" coded (hardened security by using $vbulletin->GPC) version of the same modification :)
In admincp/email.php find (line 62): Code:
'message' => TYPE_STR, Code:
'sendhtml' => TYPE_BOOL, Find (line 253): Code:
construct_hidden_code('perpage', $vbulletin->GPC['perpage']); Code:
construct_hidden_code('sendhtml', $vbulletin->GPC['sendhtml']); Find (line 286) Code:
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50); Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0); In includes/class_mail.php find (line 249): Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; Code:
if ($vbulletin->GPC['sendhtml']) |
I had lots of problems with this hack so I had to uninstall. When I post new threads on my board I had problems. I would get errors. If I posted an image in the thread I would good an error coming from the includes/class_mail on line 249.
And even if post a regular post, I my page would get stuck. The posts would still go on put I would get these errors. |
You must have had a typo or missed out a character or something in the install as I've been running it since I posted the code here and haven't had a problem at all...
I do have to say that I'm confused to why you'd get errors in class_mail if you post an image! Try from fresh files and make sure you don't delete a ; or ' accidentally... (this assumes you tried mine and not OsMoSiS.it's code edit as I have no idea what he did and the possible ramifications of a typo! :D ) |
Quote:
Thanks for greate hack. Installed. I need it for long time. |
Sorry, how can I find the send email.php template...
:nervous: |
Quote:
Read carefuly before you start your work. |
OsMoSiS.it, what does your more secure version protect against?
|
I have never edit files before, but if you could give me a pointer...sorry.... :nervous: :o
|
You'll need a file editor. Try EditPlus. The majority of file editing is copying and pasting, with a bit of searching. Just use the search and search/replace in EditPlus. I'm assuming you can FTP files if you have vB installed. :)
|
Thank you for this.
|
Quote:
LOL...yes thank you.... :nervous: |
::clicks installs ::
INSTALLED!!! Works PERFECTLY!!!!! I went to send out my first newletters for my site tonight, and after sending some test emails realized sending html emails wasnt an option. So came over here, and found this mod right away. Edited the files like it says. Works like a charm! Thanks for taking the time to do this! Awesome!! |
Works a Treat. Superb. Love it
Thanks for this |
Step 3 an be done with a Plugin, the other ones could be done (not 100% sure without impementing it) with Plugins too.
And I strongly recommend to use the modified version from this post |
excellent hack would be good if plugin was made forit tho to save file edits
|
problem with arabic
im sad |
Hi there I did the changes in the first post. Then I sent out a html email and got a db error
Database error in vBulletin 3.5.2: Invalid SQL: UPDATE vb3_session SET lastactivity = 1134492878, location = '/forum/admincp/email.php?do=dosendmail', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0 WHERE sessionhash = 'cb72da628436727c8a87044cb2eb0927'; MySQL Error : Lost connection to MySQL server during query Error Number : 2013 Date : Tuesday, December 13th 2005 @ 05:56:19 PM Script : http://www.harddanceaddict.net/forum/admincp/email.php Referrer : http://www.harddanceaddict.net/forum...l.php?do=start IP Address : Username : tidy_boy Classname : vb_database Any ideas? |
Anxious to install but I have so many hacks already I'm going to await the plugin version.
|
Quote:
|
tokenyank
It is a wonderful hack, working 100% Quote:
Yes it has a little problem with Arabic, since AJAX features doesn't support Arabic characters. From now until someone figures out how to let AJAX support Arabic features you need to disable the AJAX inside your forum, then this hack will work 100% I have tested it my self, and it is a wonderful hack. Go to: Vbulletin Option>>>>> General Settings>>>> Disable AJAX Features Then Choose, Disable Problematic AJAX Features Baitona |
Token, awesome...just tested this on 3.5.2 and without even so much as a hick-up so far.
Great job. |
Quote:
|
3.5.2
works great, even found a simple simple! way to make a newsletter :) *install |
hi tried installing this on 3.5.2, i couldnt belive but i cant find this line in email.php :
construct_hidden_code('test', $vbulletin->GPC['test']); whatam i missing! nor there is the class_mail.pho in includes directory! |
Working with 3.5.3 :)
|
thanks for this cool mod :)
[high]* The Chief clicks install[/high] |
Giz clicks "install" thanks for the hack.
One small suggestion or maybe someone can tell me how to add a "receive html newsletter" preference to the user options under their receive admin email selections. I created it in user profile fields added it to options/messaging notification but now can't see it anywhere :( |
installed and works great
|
Just upgraded my board to 3.5.4 and it still works great with no problems at all. :)
Great work tokenyank! Thanks. |
Hello,
This is what I was looking for.:cool: It'is working just fine. Thank you for this hack. Sjox |
anywa to make it send n email using the forum skin in away?
|
any hints how to modify it to send HTML welcome mails too??
thanks, Ross |
Works perfectly !! Thanks a lot !
|
perfect Install :-)
|
All times are GMT. The time now is 04:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|