PDA

View Full Version : Miscellaneous Hacks - Send Message Auto Reply


1Unreal
07-13-2009, 10:00 PM
When a user sends you a message using sendmessage.php this mod will send the user an auto reply message.

You can edit the subject and the message body in the options

How To Include HTML In The Email
By default vBulletin doesn't allow you to send HTML in an email. It can also not be changed with a plugin so you have to do some manual file edits. So...

Open "includes/class_mail.php"
Find:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;

Replace with:
$headers .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;

You can now send HTML with emails. This includes all other emails sent from vB.
Please click install :)

BroCya
07-14-2009, 11:24 PM
Wow thanks man, but know this Bot Cool!

Shaheen
07-15-2009, 01:31 AM
Nice hack ,
Thanks

Brandon Sheley
07-15-2009, 03:34 AM
nice mod, I'll install this one at some point
one question
can I add html or bbcode in the content part?
I'd like to add a few links in the auto reply

thanks

1Unreal
07-15-2009, 04:12 AM
nice mod, I'll install this one at some point
one question
can I add html or bbcode in the content part?
I'd like to add a few links in the auto reply

thanks

I tried this but whenever I changed the header to text/html it made the email contents into an attachment.

Do you know how to fix this?

princeedward
07-15-2009, 02:02 PM
thanks....will check this and have a test....TAGGED! ;)

barcena
07-15-2009, 06:21 PM
Is this Mod for Admin/Moderators only or will it wok for every member? (Hope not)

Silly question I guess....

Oh, sorry, it is an email, thought it was a PM, my mistake guys, so sorry!!!!

Brandon Sheley
07-15-2009, 07:43 PM
I tried this but whenever I changed the header to text/html it made the email contents into an attachment.

Do you know how to fix this?

hmm, I'll have to take a look
I'd really like to add a link or two to the email
I get a lot of "why am I banned" emails, and I'd like to include something like...

If you are wondering why you are banned from site.com, please check out the rules (and have a link to the rules thread) :up:

1Unreal
07-16-2009, 01:00 AM
There are a few tutorials out there showing you how to send emails that have HTML in then on vB and they envolve a hard coded hack. So I don't think it would be something that could be done with this mod.

phonexpo
07-16-2009, 11:38 PM
Installed and working perfect, thanks for making this :)

htscpl
07-17-2009, 10:36 AM
Nice, good idea.. now if we could just add some links that would be great!

Thanks for the mod!

** installs **

1Unreal
07-17-2009, 06:25 PM
Found out how to include HTML in the email. Look at the first post for a tutorial.

phonexpo
07-24-2009, 02:55 PM
Found out how to include HTML in the email. Look at the first post for a tutorial.
Hi Ben,

Thanks again, the response message works perfectly with the code edit :)

Just one little problem, the email received from the sender using the sendmessage.php is different from the original, I'm sure it's because it's not coded in .php anymore, but was wondering is there a way around this?

See - http://i27.tinypic.com/5ybx1s.jpg

Thanks again for this,

Patrick :)

1Unreal
07-24-2009, 03:17 PM
Hi Ben,

Thanks again, the response message works perfectly with the code edit :)

Just one little problem, the email received from the sender using the sendmessage.php is different from the original, I'm sure it's because it's not coded in .php anymore, but was wondering is there a way around this?

See - http://i27.tinypic.com/5ybx1s.jpg

Thanks again for this,

Patrick :)

To be honest no. The best way to fix that would be to edit the phrases of the emails being sent and replace the new lines with <br />'s.

Its because vB isn't made to send HTML emails, and the fix I posted wasn't a very good one :o

phonexpo
07-24-2009, 03:48 PM
To be honest no. The best way to fix that would be to edit the phrases of the emails being sent and replace the new lines with <br />'s.

Its because vB isn't made to send HTML emails, and the fix I posted wasn't a very good one :o
Thanks Ben, I've done that now and it's now the same as the original. :)

Here is the code;


The following message was sent to you via the $vboptions[bbtitle] Contact Us form by $name ( mailto:$email ($email) ).
<br/>
<br/>
--------------------------------
<br/>
<br/>
$message
<br/>
<br/>
--------------------------------
<br/>
<br/>
Referring Page: $url
<br/>
IP Address: $ip
<br/>
User Name: $bbuserinfo[username]
<br/>
User ID: $bbuserinfo[userid]
<br/>
Email: $email


All the best,

Patrick

Konstantinos
07-24-2009, 06:54 PM
cool but the member who gets the auto email see himself as sender it doesnt show the send as forumname but sender@ forumname

also whats the difference of using this instead of adding an autoresponder in cpanel ?