View Full Version : Mini Mods - Send emails with HTML as HTML
bchertov
01-25-2007, 10:00 PM
UPDATE: I have tested this on 4.0 Gold and it works! I have released it here:
http://ww.vbulletin.org/forum/showthread.php?t=231532
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 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!
This is my first published mod so go easy on me. I'm not up for a bunch of support, but it doesn't seem like much should be needed.
And I'd appreciate it if you clicked Install if you use it, and while your at it, nominate it for MOTM!
bchertov
01-26-2007, 05:06 PM
Reserved.
beduino
01-26-2007, 06:51 PM
tks for share.
all the best
beduino
Caerydd
01-26-2007, 08:02 PM
Very nice and useful. Makes emails much less of a chore!
ViViD
01-26-2007, 08:15 PM
I am looking for this a lot of years :p Thank you very much.
Can you include the HTML Message Editor?
Snake
01-27-2007, 04:14 AM
Thanks for this! :)
bchertov
01-27-2007, 05:27 AM
Can you include the HTML Message Editor?What HTML message editor? Do you mean the advanced Editor and then swap the BB code for HTML? That would be rather cool and convenient, but perhaps someone else could add that!
bchertov
01-27-2007, 06:40 AM
Can you include the HTML Message Editor?Is this (https://vborg.vbsupport.ru/showthread.php?t=135708) what you are talking about? I might get there eventually, but you or anybody else are welcome to do that and post it as your mod!
What HTML message editor? Do you mean the advanced Editor and then swap the BB code for HTML? That would be rather cool and convenient, but perhaps someone else could add that!
Is this (https://vborg.vbsupport.ru/showthread.php?t=135708) what you are talking about? I might get there eventually, but you or anybody else are welcome to do that and post it as your mod!
Yes, I think this (https://vborg.vbsupport.ru/showthread.php?t=135708) HTML Editor With Advanced Tool bar would be very helpful for writing HTML or BBCode Email Message. :)
Snake
01-27-2007, 12:37 PM
Yes that would be a great idea, of course! :)
redg8r
01-28-2007, 01:13 PM
No one asked, so Im curious, is it possible to send html thru the public email contact form (sendmessage.php)? if so, I'd be very worried.
If its an admin only function that works only thru the CP, then I'll gladly install.
Thanks
bchertov
01-28-2007, 02:15 PM
No one asked, so Im curious, is it possible to send html thru the public email contact form (sendmessage.php)? if so, I'd be very worried.
If its an admin only function that works only thru the CP, then I'll gladly install.
ThanksYes, this will allow users to send private HTML email.
TPOCJames
01-28-2007, 03:32 PM
Thanks! Exactly what I was looking for. *installed*
:)
So far.... Loving this plugin!!! Flawless....
bchertov
02-07-2007, 03:20 PM
Thanks! Exactly what I was looking for. *installed*
:)
So far.... Loving this plugin!!! Flawless....Thanks guys, I thought some of you folks would like this!
tankaya61
02-07-2007, 07:33 PM
how can i use google adsense code?
for example;
<script type="text/javascript"><!--
google_ad_client = "pub-7480331696500728";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
bchertov
02-08-2007, 05:22 PM
how can i use google adsense code?
for example;
I don't understand your question, do you want to include a google ad in your email? AFAIK, google does not support ads in email.
tankaya61
02-08-2007, 07:12 PM
hımmm
i dont know not working adsense kode in mail
sorry bchertov
BobbyBig
02-11-2007, 09:37 AM
bchertov there should be options if all users or only admin can use it.
Also in what emails html should be used - I dont like to edit all email phrases and add <br /> because of that.
This is not a bad plugin, but there need to be improvement.
regards
abhimation
02-15-2007, 07:06 PM
Thnxxx... I was lookin for something like this !!!
T_Richardson
02-22-2007, 02:31 AM
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!
Before I install, where do I edit the stock phrases and put in the <br /> code?
I don't want to mess things up.
I was looking for this for a good while, with this info I'll install.
Thanks,
T
bchertov
02-22-2007, 03:40 PM
[QUOTE=T_Richardson;1188037]Before I install, where do I edit the stock phrases and put in the <br /> code?/QUOTE]Goto your Admin control panel and pop-down the Language and Phrases section on the left and then choose Search in Phrase. Note that you can search by the phrase content or by the phrase name. You may want to consult the vb manual for a little background on phrases. You want to look for any emails that your system sends out, such as your "welcomemail".
Pay particular attention to the phrases that are of phrase type "email body text".
T_Richardson
02-22-2007, 04:04 PM
[QUOTE=T_Richardson;1188037]Before I install, where do I edit the stock phrases and put in the <br /> code?/QUOTE]Goto your Admin control panel and pop-down the Language and Phrases section on the left and then choose Search in Phrase. Note that you can search by the phrase content or by the phrase name. You may want to consult the vb manual for a little background on phrases. You want to look for any emails that your system sends out, such as your "welcomemail".
Pay particular attention to the phrases that are of phrase type "email body text".
I found these phrases located under "email body text", now, do I need to erase these and put in my HTML codes in them?
This is what is in my "welcomemail"
$username,
Thanks for registering at $vboptions[bbtitle]! We are glad you have chosen to be a part of our online gaming community and we hope you enjoy your stay.
All the best,
$vboptions[bbtitle]
Do I need to replace that with HTML?
bchertov
02-23-2007, 04:19 AM
Do I need to replace that with HTML?Yes! To have it appear the same, you'll need to add <br /> for each carriage return. So that's one at the end of each paragraph and another for each new line.
timrox
02-23-2007, 06:39 AM
i love such elegant solutions, to think i was about to hard-hack about 5 different files! Thanks
bvtonedog
03-01-2007, 10:45 PM
excellent, I was just looking for somethings like this. To get around members sending html email I simply disable right after I send out my emails through the acp, though an option to only allow html emails to be sent from the acp would be great
johnny713
03-02-2007, 03:25 AM
I not really sure exactly how this work, but I give it a try. *Installed*
bchertov
03-02-2007, 04:28 AM
excellent, I was just looking for somethings like this. To get around members sending html email I simply disable right after I send out my emails through the acp, though an option to only allow html emails to be sent from the acp would be greatWhy prevent users from sending HTML? I suppose they could put some nasties in it,... I hate assuming people are not going to nice!
Maksa
03-07-2007, 11:06 AM
bchertov :) thanks a lot for this hack. i was looking for some hack so i can email my users with html :) i m really happy. thanks a lot.
cartooner
03-15-2007, 03:35 PM
Yes! To have it appear the same, you'll need to add <br /> for each carriage return. So that's one at the end of each paragraph and another for each new line.
Do you need to add a <br /> and a <p>? or just the break.
cartooner
03-15-2007, 04:11 PM
..or can I dress up the Welcome Message using html..??
phonexpo
03-15-2007, 09:38 PM
@bchertov
Would the receiver of the e-mail see the e-mail in HTML if they had their e-mail setting to read in plain text only?
I use to e-mail my members in HTML, but some of them complained because they just saw the HTML code as they where reading the mail in plain text.
Thanks,
Patrick
bchertov
03-16-2007, 04:13 AM
Do you need to add a <br /> and a <p>? or just the break.The <br /> will give you a carriage return with no blank line and a <p> </p> will give you both. Personally I like to code with a <br /> for every carriage return (adding an extra for a blank line)
..or can I dress up the Welcome Message using html..??Totally! But see below!
@bchertov
Would the receiver of the e-mail see the e-mail in HTML if they had their e-mail setting to read in plain text only?
I use to e-mail my members in HTML, but some of them complained because they just saw the HTML code as they where reading the mail in plain text.That still applies. I've help several users switch to HTML>
phonexpo
03-16-2007, 09:36 AM
That still applies. I've help several users switch to HTML>
Ok, thanks bchertov. How did you help the members switch?, did you post a "How to change your e-mail setting" for each mail client on your forum?, cause that would be a good idea.
Thanks,
Patrick
Tom_S
03-30-2007, 08:13 PM
SaWeeeeeeeeT!! Installed!
Thanks ;)
anarx
03-31-2007, 01:49 AM
Thank you for this hack :D
:installed:
Barakat
03-31-2007, 01:57 AM
i was useing psionic html hack emmm but i dont know why the post was been deleted
anyway this hack is working great and thanks 100000000000000 times
audis3
03-31-2007, 07:44 PM
I installed it and i sent an email to myself for testing.
I wrote for example <body bgcolor="CCCCCC">My email here</body> but no change is happening.
Am i doing something wrong?Also when i put an image happening the same.
bchertov
03-31-2007, 10:43 PM
I installed it and i sent an email to myself for testing.
I wrote for example <body bgcolor="CCCCCC">My email here</body> but no change is happening.
Am i doing something wrong?Also when i put an image happening the same.Make sure you got the pluggin enabled and that your email client is set up to display rendered HTML. I presume this should be handled. you might try with just a <b> & </b> tags or an <a> tag which I know works just fine.
audis3
04-01-2007, 11:51 AM
It was active.I wrote the code with the <b> tags and it worked.
The only thing that isn't working is the background color.
I tried <b bgcolor=red> or <bgcolor=red> and didn't work.
Any ideas?
bchertov
04-02-2007, 04:12 AM
It was active.I wrote the code with the <b> tags and it worked.
The only thing that isn't working is the background color.
I tried <b bgcolor=red> or <bgcolor=red> and didn't work.
Any ideas?Hmmm... this is a very simple mod, just a few lines. It's based on the PHP strip_tags (http://us2.php.net/strip_tags) function. I'm surprised its not catching. So a workaround would be to include a basic HTML tag in your post, such as <br />
If some one wants to run down this issue and suggest a fix, please post it here!
akulion
04-05-2007, 11:22 AM
simply awesome!!
thanks! :D
cartooner
04-06-2007, 04:07 AM
The <br /> will give you a carriage return with no blank line and a <p> </p> will give you both. Personally I like to code with a <br /> for every carriage return (adding an extra for a blank line)
Totally! But see below!
That still applies. I've help several users switch to HTML>
Ok ...can you give me examples on how to change the Welcome email that is sent to newbies. Also the email that is sent to members who subscribe to threads, how is that changed to HTML??
I really like the hack, but the welcome message and the subscribed threads email is a problem. Could you help??
Snake
04-06-2007, 02:23 PM
Can anyone confirm this if it's going to work fine on v3.6.5 please?
Maksa
04-06-2007, 03:14 PM
it works with 3.6.5 too :) i m using the same... great hack :)
bchertov
04-07-2007, 08:58 PM
Ok ...can you give me examples on how to change the Welcome email that is sent to newbies. Also the email that is sent to members who subscribe to threads, how is that changed to HTML??
I really like the hack, but the welcome message and the subscribed threads email is a problem. Could you help??
Are you seeing problems with those email? The stock message may work just fine as they don't include HTML. If you are having trouble with those messages please describe it.
cartooner
04-08-2007, 11:46 PM
Some members reported that the email they recieved notifying them of new posts in subscribed thread was garbled after I put in the MOD.
Some too with Welcome Message.
I was wondering if I do the Welcome message all in HTML would that work?? But how would I code it so the message addresses the new member by their username, as it does without the MOD installed.
bchertov
04-09-2007, 04:28 PM
Some members reported that the email they recieved notifying them of new posts in subscribed thread was garbled after I put in the MOD.
Some too with Welcome Message.
I was wondering if I do the Welcome message all in HTML would that work?? But how would I code it so the message addresses the new member by their username, as it does without the MOD installed.Yes, the idea is that if any of your messages have any HTML then the whole message must be formatted in HTML. You can still use the variables that are used in the plain text message ($<varname> or {1}, etc.)
needtheend
04-09-2007, 08:29 PM
do all html codes work ?
bchertov
04-10-2007, 01:53 AM
do all html codes work ?It's based on the PHP strip_tags (http://us3.php.net/strip_tags) function. So anything it recognizes as a HTML tag would be supported.
Snake
06-12-2007, 10:53 PM
Works on 3.6.7?
bchertov
06-13-2007, 05:41 PM
Works on 3.6.7?I haven't tried it yet, but I'd be very surprised if it didn't. Anybody else try it on 3.6.7
webmaster74
08-11-2007, 05:50 PM
what a very lovely mod.
really one of the best.
not only install it, but also nominate it ! it works lovely with vb 3.6.8
it deserves your nomination!
I love it.
bchertov
08-12-2007, 09:59 PM
what a very lovely mod.
really one of the best.
not only install it, but also nominate it !
it deserves your nomination!
I love it.
Thanks!
webmaster74
08-17-2007, 09:07 PM
Hi.
is there a way to make this mod also work for sending html-rich email notices (such as about new replies to a topic the user subscribed to) ???
bchertov
08-18-2007, 08:20 AM
Hi.
is there a way to make this mod also work for sending html-rich email notices (such as about new replies to a topic the user subscribed to) ???
It looks for proper HTML codes such as <b>. So any email that gets sent out with an HTML tag in it will be sent as HTML.
So you could change the phrase that is used to send out new replies notices to include at least one HTML tag, but be careful! Note that that carriage returns in the code will need to be changed to <br /> and it may need some other formatting changes to render correctly in HTML.
jfreels
09-04-2007, 04:58 PM
Very nice addition, thanks!
njoker555
11-01-2007, 05:30 PM
excellent mod lol :D works perfectly on 3.6.8 :D
Tom_S
11-01-2007, 05:59 PM
Actually it don't. It works perfect for sending. Sign yourself up as a new member and look what the new activation email looks like when it sends it to you. To avoid that I just install this mod when I use it to send html email and uninstall it when I am done until someone comes up with a fix.
njoker555
11-01-2007, 06:14 PM
Actually it don't. It works perfect for sending. Sign yourself up as a new member and look what the new activation email looks like when it sends it to you. To avoid that I just install this mod when I use it to send html email and uninstall it when I am done until someone comes up with a fix.
really? i just sent myself a password reminder and it worked, i made a new users and tried it, waiting for activation email lol, dont know why its taking so long :/ but if it works like u said, i'll do the same as you do :)
thanks!
Tom_S
11-01-2007, 06:40 PM
Don't get me wrong..I love the mod..It isn't that big of a deal for me to install and un-install for the luxury of using it. If someone comes up with a fix then that is a bonus. If not. I'm still good. ;)
bchertov
11-02-2007, 04:23 AM
Actually it don't. It works perfect for sending. Sign yourself up as a new member and look what the new activation email looks like when it sends it to you. To avoid that I just install this mod when I use it to send html email and uninstall it when I am done until someone comes up with a fix.
Please post what you see (or describe it). I presume this is a case where mod worked just fine but the message being sent contains HTML even though it is formatted to be sent as plain text (ie with carriage returns rather than <br>s or <P>'s.
To fix, just edit the phrase than contains the email body and either remove all HTML or add more so it formats correctly with when rendered as HTML.
Tom_S
12-31-2007, 12:31 AM
I must have missed this post. That is what I said. I would have to go to each of what VB sends out and adjust it accordingly with html edits to make it work and I am not sure what all is actually sent out. I never checked. Again. Not a problem. At some point I may do that however. I like it very much and it isn't an issue installing and uninstalling for use.
Tom_S
12-31-2007, 08:02 PM
As soon as I posted that I now have a problem with it today for the first time. I have it making quotes " " and apostrophe's ' into boxes for whatever reason. It figures when I am counting down the hours and minutes when I send out the first newsletter of the new year! LOL
bchertov
01-01-2008, 04:59 PM
As soon as I posted that I now have a problem with it today for the first time. I have it making quotes " " and apostrophe's ' into boxes for whatever reason. It figures when I am counting down the hours and minutes when I send out the first newsletter of the new year! LOLHi Tom.
I think your issue is with the email encoding (UTF-8). If there is HTML codes for those characters (such as "?) try switching to them.
Tom_S
01-02-2008, 04:17 AM
I will give that a shot. I ended up sending it out like that with apologies. It got late. I had ones that received theirs in Yahoo mail that said it didn't show that way so I have no idea why it did for me when I tested it. I received it that way in both Outlook and Outlook Express with the boxes. I have been holding off on a few things until version 7 of VB is debugged to see what direction we go with that. I appreciate the help on it bchertov. I will try that and see if it helps.
Todecay
01-03-2008, 09:09 PM
simple but a very sweet and usefull mod. Thanks m8!
redraider
03-27-2008, 11:08 PM
Great plugin, thanks!
It does not work on my 3.7.0 :(
ops... sorry
It works !
I just had to set yes Allow Overwrite during installation.
Thank you !
jburnette84
05-15-2008, 01:55 PM
Works perfect! Thanks so much.
jamyk
06-24-2008, 12:39 PM
Thanks so much
theparentpack
01-21-2009, 02:27 PM
Is it possible to restrict usage to the admin only?
No one asked, so Im curious, is it possible to send html thru the public email contact form (sendmessage.php)? if so, I'd be very worried.
If its an admin only function that works only thru the CP, then I'll gladly install.
Thanks
Yes, this will allow users to send private HTML email.
chriske
04-02-2009, 10:18 AM
Is it possible to restrict usage to the admin only?
good question, wondering who has got a solution?
GraphiX2004
04-07-2009, 03:10 PM
does this work on v3.8.1?
JamesGunner
12-23-2009, 08:41 PM
Are you guys going to port this to vb4? I like this little plugin!
bchertov
12-24-2009, 04:31 PM
Are you guys going to port this to vb4? I like this little plugin!
Well, thanks! I imagine so, but not for a while. It's really quite simple - check out the code! You are welcome to port it if you like - the biggest issue would be verifying the hook name and the appropriate variable to check to see if its changed.
bchertov
12-29-2009, 05:18 AM
I have tested this on 4.0 Gold and it works! I have released it here:
https://vborg.vbsupport.ru/showthread.php?t=231532
VIPTV
04-30-2011, 02:59 AM
will this work properly with vb 3.7.2 PL1 ?
bchertov
04-30-2011, 01:29 PM
will this work properly with vb 3.7.2 PL1 ?I haven't tested that - but I'm 99% sure it will!
nick!
05-24-2011, 01:32 PM
Installed...Works good, thankyou!
packosoft
02-24-2012, 11:22 AM
Hi,
I'd installed it and it works, but in notify emails when the message quoted has a carriage return, that 'break lines' are not shown in the mails because it isn't in html, just plain text
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.