Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Send emails with HTML as HTML Details »»
Send emails with HTML as HTML
Version: 1.00, by bchertov bchertov is offline
Developer Last Online: Apr 2020 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.0 Rating:
Released: 12-28-2009 Last Update: 12-28-2009 Installs: 253
Uses Plugins
Re-useable Code  
No support by the author.

Hi Folks,

Here's a nice little pluggin (No Code changes!) my programmer (Bryan Harris) came up with that sets the email type as HTML if the body of an email contains any HTML.

This is just a copy of the original 3.6 mod (165 installs!) - it works fine under 4.0 too! (See testimonials for earlier mods in the Similar Mod links below.)

This is very powerful and flexible, but also a bit dangerous. This means that any email your system sends out that contains any HTML will be sent as HTML. Which means that the whole email should be formatted as HTML.

So for instance, it makes it very easy to send HTML emails from the ACP - Just include HTML in your message! Same goes for users sending private email.

You'll also need to update some of the stock phrases for the registration confirmation email, password change, etc, that contain links or other HTML, and add line breaks <br /> so they still format correctly. And while you're in there you could add your logo and other nice touches!

It's just one pluggin!

Install time: a few seconds!

And I'd appreciate it if you clicked Install if you use it, and while your at it, nominate it for MOTM!

Download Now

File Type: xml product-auto_html_emails.xml (809 Bytes, 1405 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
7 благодарности(ей) от:
elsa23, J.kay, nacaruncr, nit233, RichieBoy67, Rvl, webmaster74

Comments
  #72  
Old 03-12-2013, 03:13 PM
lcn lcn is offline
 
Join Date: Nov 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone confirm that this works with 4.2.0 ?
Reply With Quote
  #73  
Old 03-27-2013, 06:39 PM
Dragon Company's Avatar
Dragon Company Dragon Company is offline
 
Join Date: Dec 2004
Location: France
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bchertov View Post
I release this hack into the public domain. Anybody is welcome to send me a fix and I'll update it or release a new hack based on this - but please give me credit for original design.
But Im' more a designer than a coder, so I won't be usefull.
Anyway it works perfectly on my 4.2.0. Problem was my server with too agressive cache.

Thanks again for all what you've done
Reply With Quote
  #74  
Old 03-27-2013, 06:46 PM
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dragon Company View Post
But Im' more a designer than a coder, so I won't be usefull.
Anyway it works perfectly on my 4.2.0. Problem was my server with too agressive cache.

Thanks again for all what you've done
Thanks for letting me know Dragon!

This is a risk you take with this hack - I'm guess HTML email are more likely to marked as spam. So if you are not recieving the emails that this hack sends out, please check your spam filters.

khoking (and anybody else using 4.2) can you plesae chime in if infact this hack will work with 4.2? Again, if the emails get trapped by a spam filter, it doesn't mean that this hack doesn't work!
Reply With Quote
  #75  
Old 03-27-2013, 11:42 PM
Nonowmana Nonowmana is offline
 
Join Date: Jun 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for version 4.2

First step:

In admincp/email.php Find:
PHP Code:
print_textarea_row($vbphrase['message_email'], 'message'''1050); 
add just below
PHP Code:
print_yes_no_row('Send HTML Email?''sendhtml'0); 
Find:
PHP Code:
construct_hidden_code('test'$vbulletin->GPC['test']); 
add just below

PHP Code:
construct_hidden_code('sendhtml'$_POST['sendhtml']); 
step 2

in includes/class_mail.php Find:

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

PHP 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

source: http://www.vbulletin-ressources.com/...032#post141032
Reply With Quote
Благодарность от:
kmplex
  #76  
Old 06-07-2013, 03:22 PM
synseal's Avatar
synseal synseal is offline
 
Join Date: Apr 2009
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bchertov View Post
Thanks for letting me know Dragon!

This is a risk you take with this hack - I'm guess HTML email are more likely to marked as spam. So if you are not recieving the emails that this hack sends out, please check your spam filters.

khoking (and anybody else using 4.2) can you plesae chime in if infact this hack will work with 4.2? Again, if the emails get trapped by a spam filter, it doesn't mean that this hack doesn't work!
This appears to be working fine for me after testing using vb 4.2.0 pl3 with vbseo.
Reply With Quote
  #77  
Old 11-12-2013, 07:27 PM
craigvm's Avatar
craigvm craigvm is offline
 
Join Date: Aug 2012
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this mod is working fine for me on vb 4.2.2
Reply With Quote
Благодарность от:
tbworld
  #78  
Old 02-17-2014, 10:59 AM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nonowmana View Post
for version 4.2

First step:

In admincp/email.php Find:
PHP Code:
print_textarea_row($vbphrase['message_email'], 'message'''1050); 
add just below
PHP Code:
print_yes_no_row('Send HTML Email?''sendhtml'0); 
Find:
PHP Code:
construct_hidden_code('test'$vbulletin->GPC['test']); 
add just below

PHP Code:
construct_hidden_code('sendhtml'$_POST['sendhtml']); 
step 2

in includes/class_mail.php Find:

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

PHP 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

source: http://www.vbulletin-ressources.com/...032#post141032
Hi, thanks for this - will test it shortly.....
Reply With Quote
  #79  
Old 09-13-2014, 12:31 PM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nonowmana View Post
for version 4.2

First step:

In admincp/email.php Find:
PHP Code:
print_textarea_row($vbphrase['message_email'], 'message'''1050); 
add just below
PHP Code:
print_yes_no_row('Send HTML Email?''sendhtml'0); 
Find:
PHP Code:
construct_hidden_code('test'$vbulletin->GPC['test']); 
add just below

PHP Code:
construct_hidden_code('sendhtml'$_POST['sendhtml']); 
step 2

in includes/class_mail.php Find:

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

PHP 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

source: http://www.vbulletin-ressources.com/...032#post141032
Hi

Do you do this after installing the mod or do we just do this and not upload the mod? Specifically for vB 4.2
Reply With Quote
  #80  
Old 09-18-2014, 12:14 AM
Art Andrews Art Andrews is offline
 
Join Date: Jan 2005
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great mod, but one of the issues we are having is that all of the text in a notification, especially if there is a quote involved, is one large block with no coding applied. Is there any way to change this so actually content of the email is formated as well?
Reply With Quote
  #81  
Old 10-08-2014, 04:57 PM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Art Andrews View Post
This is a great mod, but one of the issues we are having is that all of the text in a notification, especially if there is a quote involved, is one large block with no coding applied. Is there any way to change this so actually content of the email is formated as well?
I added divs (HTML) wrapped around the $text (or $message) and that formats the PM alert to an extent. A multi quote gets messy.

However I've since removed the actual PM text and instead added a login link so our users must visit the forum to view PM's.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05435 seconds
  • Memory Usage 2,388KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (18)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (9)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete