![]() |
Send HTML emails from adminCP
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']) { (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)** |
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 :D
|
File edits
EEK |
I was actually looking at your 3.5 hack yesterday! Thanks for the update.
|
Quote:
|
Quote:
|
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! Quote:
Quote:
|
I hope this isn't bad form, but when I saw that this mod required file edits :eek: , 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! :D |
I second bchertov's hack. Elegant and simple to install.
|
I installed with the file edits as I had done in a previous ver of VB.
Thank you. |
All times are GMT. The time now is 11:34 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:
|