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

Reply
 
Thread Tools
Send HTML emails from adminCP Details »»
Send HTML emails from adminCP
Version: 1.00, by tokenyank tokenyank is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Version: 3.5.7 Rating:
Released: 11-01-2005 Last Update: 11-24-2006 Installs: 152
Code Changes  
No support by the author.

***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);
Directly below it place:
Code:
 print_yes_no_row('Send HTML Email?', 'sendhtml', 0);
Step 2:
In admincp/email.php find:

Code:
 construct_hidden_code('test', $vbulletin->GPC['test']);
Directly below it place:
Code:
 construct_hidden_code('sendhtml', $_POST['sendhtml']);
Step 3:
In includes/class_mail.php find:
Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
and replace with:
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;
}
Special thanks goes to non vB users Darryn, Pink, DO, and Dang for the helping me with syntax and pointing me in the right direction to get this done.

(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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 10-14-2006, 06:07 AM
siriuxs siriuxs is offline
 
Join Date: Nov 2005
Location: Italia
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It exist for vbulletin 3.6.x ???
Reply With Quote
  #73  
Old 10-20-2006, 12:03 AM
AzzKikr AzzKikr is offline
 
Join Date: Sep 2005
Location: Perth, Western Australia
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup - just insert the above code into your 3.6.x install as required.

Works beaut

-A.
Reply With Quote
  #74  
Old 10-21-2006, 02:05 PM
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I installed it on vb 3.6.2.

But where do I go to send html mail now?

EDIT: Nevermind, I found it.

It was in admincp > Users > Send mail to users
Reply With Quote
  #75  
Old 10-21-2006, 05:22 PM
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I sent out two or thre test e-mails over three hours ago but have still not received them.

Why are so many people saying it works?
Reply With Quote
  #76  
Old 10-21-2006, 11:59 PM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnitchSeeker
I sent out two or thre test e-mails over three hours ago but have still not received them.

Why are so many people saying it works?

Test Email Only?
(Will not send any email out)


well - I don't think you would receive them - they're TEST emails right?
test it by sending just to ADMIN user group - test email only set to no.

Jacquii.

ps - works like a charm
Reply With Quote
  #77  
Old 10-22-2006, 03:10 PM
farukcan's Avatar
farukcan farukcan is offline
 
Join Date: Oct 2006
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, thanks
Reply With Quote
  #78  
Old 10-23-2006, 12:00 PM
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PoetJA-1975
Test Email Only?
(Will not send any email out)


well - I don't think you would receive them - they're TEST emails right?
test it by sending just to ADMIN user group - test email only set to no.

Jacquii.

ps - works like a charm
You're right! That was the reason I didn't get an e-mail...

BUT now that I got it to send a mail (by not having Test Email Only? checked) in my mail, instead of seeing HTML rendered, I get the HTML code spelled out like a regular text-mail (with the tags and everything). It doesn't render!

Are there rules we are supposed to follow on how to write the mails? Only certain tags supported? I entered HTML as though it was a web-page (with <head> and <body> and everything)!
Reply With Quote
  #79  
Old 10-23-2006, 04:22 PM
CRBadBeat CRBadBeat is offline
 
Join Date: Jul 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a toggle switch to choose HTML or not that is default no. Just make sure you click the yes box.
Reply With Quote
  #80  
Old 10-24-2006, 12:52 AM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CRBadBeat
There is a toggle switch to choose HTML or not that is default no. Just make sure you click the yes box.
yep

Jacquii.
Reply With Quote
  #81  
Old 10-24-2006, 09:55 AM
SnitchSeeker's Avatar
SnitchSeeker SnitchSeeker is offline
 
Join Date: Sep 2004
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh thank you!

I can't believe I am making these silly mistakes...


EDIT: Yippi!! This works perfect! Sweet!

Cheers all!
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 06:39 AM.


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.05227 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete