The Arcive of vBulletin Modifications Site. |
|
Send HTML emails from adminCP Details »»
|
|||||||||||||||||||||||||
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: 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']) {
$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.1PL)** Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Thick moment here but does this allow it to send a image so the image is seen when email opened. like u get in alienware email for example. if so just what i need
|
|
#3
|
||||
|
||||
|
File edits
EEK |
|
#4
|
||||
|
||||
|
I was actually looking at your 3.5 hack yesterday! Thanks for the update.
|
|
#5
|
||||
|
||||
|
You cas always add an img tag to your template. Placing the image file in your server. But viewers wont be able to see the image if they open the email offline.
|
|
#6
|
|||
|
|||
|
Can u PM me with how to do that please?
|
|
#7
|
|||
|
|||
|
Quote:
So, you'd have your email: Blah blah blah Blah blah blah Blah blah blah Blah blah blah Blah blah blah Blah blah blah Blah blah blah Then you want an image, you'd do it just like a webpage: <img src="http://www.domain.com/image.jpg"> Then, when the emails are opened *WITH* a HTML ready email client, you have a pretty email! Hey, I was lucky enough to figure out how to do this as it was with almost 0 coding ability... You don't want to edit files, release a plugin and I'll install it too! ![]() Quote:
|
|
#8
|
||||
|
||||
|
I hope this isn't bad form, but when I saw that this mod required file edits
, I posted a handy little pluggin that automatically sends out any message with HTML in the body text as an HTML email, including from the ACP! Check it out here.I thought I'd give you folks a heads up!
|
|
#9
|
|||
|
|||
|
I second bchertov's hack. Elegant and simple to install.
|
|
#10
|
||||
|
||||
|
I installed with the file edits as I had done in a previous ver of VB.
Thank you. |
![]() |
|
|