PDA

View Full Version : Email posts into forum


Admin
07-02-2002, 10:00 PM
*phew*

Here it is people, the hack I use at vBulletin.org that allows you to send replies to the thread through email.
I've rewritten most of it in the last couple of days, killing bugs and making the code more readable with comments.

Installation is pretty easy, download the attaced ZIP file and read readme.txt.

This hack is provided as is and with no support whatsoever!
DO NOT email, private message or contact me through any other means about this hack. You will be ingored and receive bad jake karma! (provided graciously by jake Inc.)
Bug reports are welcome.

I hope none of you will need any support, this is not a space ship and you don't need to be a rocket scientist to install it.

* FireFly waits for someone to request a screen shot... :dead:

Enjoy! :)

Wildthinks
07-03-2002, 08:52 AM
* Wildthinks :paranoid: :surprised: :p request a screen shot...

ModshackUK
07-03-2002, 08:59 AM
Chen can I have your email password so I can try it out ?

Ermmmmm

I'll get my coat then

HM

Floris
07-03-2002, 09:06 AM
Thank you kindly for sharing it.

Virix
07-03-2002, 11:18 AM
require('./mimeDecode.php');

Think that file is required??? :D


I know I know, no support but it would be nice to get all the files :D

Lionel
07-03-2002, 12:17 PM
found the mimeDecode.php. But itself requires pear.php and cannot find that one.

Admin
07-03-2002, 02:50 PM
Ok, uploaded a new file to the first post. Make sure you download the new zip file, then upload mimeDecode.php to your forums folder.

Lionel: This is a modified version that doesn't require PEAR. You can get PEAR from http://pear.php.net/ if you really must know. :)

Lionel
07-03-2002, 02:59 PM
OK, I am using bigmailbox and my MX are pointed to them. Therefore all emails addresses @mysite.com come from bigmailbox.

Anybody, not Firefly :ermm: , is there a way to handle the below?

(7) Your part is done, now you need to ask your host to setup an email pipe on the server from newpost@example.net (this is the email you chose in step (2)) to getpost.php (the path from step (5)).

Kars10
07-03-2002, 03:32 PM
<-same problem here-> :confused:

globalwin
07-03-2002, 03:42 PM
whats a mail pipe? can i just make the thing in my virtual control pannel for my domain?

Dean C
07-03-2002, 04:03 PM
*alluleia at this hack*

great job... im going to install it on my latest project...

Marv
07-03-2002, 07:04 PM
Originally posted by FireFly

Installation is pretty easy, download the attaced ZIP file and read readme.txt.

This hack is provided as is and with no support whatsoever!
DO NOT email, private message or contact me through any other means about this hack. You will be ingored and receive bad jake karma! (provided graciously by jake Inc.)
Bug reports are welcome.

I hope none of you will need any support, this is not a space ship and you don't need to be a rocket scientist to install it.


Thanx for sharing this hack & your documentation, Chen - that was quiet earlier as you promised :)

But...okay..in german may be everything sounds even more strange, ...but can anyone explain what the heck an eMail-pipe is ? :confused:

Chen, we all read that you don?t wanna give any support for this hack - but could you give us a little help and explain what this eMail-pipe is ? As you can see many off us ran into this problem and a short description in the readme.txt could lighten up the dark :nervous:

TIA,
Marv.

Lionel
07-03-2002, 07:12 PM
:rambo:
here comes Firefly with the help.

:p

Velocd
07-03-2002, 07:19 PM
Nope, me instead :p

Actually I can't provide any help, but I would like to say this is pretty cool and I'm sure my members would enjoy it. I haven't used it yet at VB.org, but I haven't had a need to.

Chris M
07-03-2002, 07:21 PM
Where?

*Looks up at the sky*:D

Thanks Chen...Real good:)

Satan

globalwin
07-03-2002, 07:55 PM
whats an Email PIPE?

/me getting annoyed now... seriously PERIOD.

Marv
07-03-2002, 08:52 PM
I guess an eMail-Pipe is a server sided option which let emails from a particular account point to a shell-script.

..and I guess only 5 percent of us get access to the shells or have a dedicated server ... :(

On most shared servers email-pipes are forbidden because they?ve been used in the past as some kind of attack-tools. Btw the?are listed in/as the "Network Attack Signatures (http://www.tivoli.com/support/public/Prodman/public_manuals/td/TRM/GC32-0703-01/en_US/HTML/user354.htm) " . That?s the reason my Hosting-Provider won?t support this feature. :dead:

Any chance to get this fabulous hack to work in another way ?

globalwin
07-03-2002, 10:10 PM
it would be rather helpful if Chen did offer support :mad:

Admin
07-04-2002, 06:53 AM
Originally posted by globalwin
it would be rather helpful if Chen did offer support :mad:
I'm not in the mood, shove it.

Admin
07-04-2002, 06:54 AM
Originally posted by Marv
I guess an eMail-Pipe is a server sided option which let emails from a particular account point to a shell-script.

..and I guess only 5 percent of us get access to the shells or have a dedicated server ... :(
That's pretty much correct. You need to ask your host to set it up, you can't do it yourself (unless you own the server).

Bugz
07-04-2002, 06:59 AM
ahh very nice you are a god i will install when i get my site all ready to go and get that pipe going

Velocd
07-04-2002, 07:00 AM
Originally posted by FireFly

I'm not in the mood, shove it.

lol :D That is what you get for being a snot and pushy globalwin ;)

Marv
07-04-2002, 12:16 PM
hmm.. so far: the last two hours i was on the phone, checking german providers for supporting email-pipes, but... hell what a f[***] ! , ... no chance.

Does anybody know how people like me - which can´t get email-pipes from their hosters - could get this script up and running ?

Chen, don´t wanna bother you..but any chance that you´ld do some coding for the other "95 percent-users" without email-pipes ? Or anyone else able to do this ? Even would pay for it...

Could bit my ass for being in germany..,
Marv

*bump it up..*

Dean C
07-04-2002, 03:53 PM
Originally posted by FireFly

I'm not in the mood, shove it.

lmfao at moody firefly... whats up man?

globalwin
07-04-2002, 04:38 PM
LOL yeh, my guess is that he is moody cause his Mail Server is down :D, am I right?

Slynderdale
07-05-2002, 10:34 AM
Times like this im glad i have access to a dedicated server, my freind owns it but gave me shell and every thing, i can do any there there :)

hypedave
07-05-2002, 12:49 PM
you guys may want to go take a look at this hack

[vB v2.2.5] Reply by email v. 0.1 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36899&highlight=reply+by+email)

I have using it he released it in the beta forum, it has been running perfect for me, not trying to fish firefly's hack im sure its good and all, but for those of you who want a similar hack with support, just use the one im using

Marv
07-05-2002, 03:44 PM
hypedave,

as you can see here at vb.org the hacks aren?t simuliar. Firefly included some thing which are missing in your hack (which I installed before, too) . Firefly?s hack has options two set email-passwords as another security-feature and the best of all - you dont have to run the mailreply.php manual. His hack runs automaticly :)

hypedave
07-05-2002, 05:21 PM
Originally posted by Marv
hypedave, dont have to run the mailreply.php manual. His hack runs automaticly :)

well that I didnt know :hurt: , I did not write the hack, but as to my understanding I do have an updated version that has two set of emails for security :p . not to go off topic but I will try this one out on my other forum

memobug
07-08-2002, 07:43 AM
Great hack!, but can I use it to play the Guessing Game by remote email from my cell phone while driving?

;)

thirdwatch430
07-17-2002, 11:53 PM
Can someone help me setup e-mail piping??? I have no clue.

Heineken77
07-18-2002, 01:31 AM
Is this customizable so that only Admins can use this function? :)

Fuitad
07-22-2002, 05:09 PM
Any idea why all my posts get posted twice?

MarkyBuzz
07-30-2002, 10:28 AM
I would love to have this hack working ( anyone but FireFly?? )

I have followed instruction the the CaPitaL T and an email pipe has been setup etc. But when someone receives a mail, it doesnt include the message of the post to read.

And the reply sends a Mail Delivery error:

This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/mtbnet/public_html/getpost.php
generated by postreply@mtbnetworx.com
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command:
/home/mtbnet/public_html/getpost.php

Looks like a cracking hack, if it works :)

Chruser
07-31-2002, 11:11 AM
Isn't it usually just easier to log onto the board and send a reply, than to log onto your email?

MarkyBuzz
07-31-2002, 11:31 AM
Erm.... you would be correct in saying that it is, easy to log onto the board - but isnt this the whole point of this hack - I`ll explain for you ;)

When you click email notification, you get a mail in your email client stating that a reply has been posted to your post. You would then have to visit the board to find out what the reply was.

With this hack - the reply is automatically sent to you in the email - and because you are more likely to open your email client and read that somebody has replied - it is convenient to just click reply from an already opened email client and send your reply by mail. EASY ;)

:alien:

Gary King
07-31-2002, 09:04 PM
@MarkyBuzz: One thing I have to say, though, is that I bet lots of people will still want to see if their post has been posted properly (when using vB codes / HTML) :p

But nevertheless, I bet this post will help out lots of 56kers :D

mADmAX`
08-01-2002, 07:53 PM
I have it installed and works like a charm but I have a question. My mods and I have a shortcut (admin options) to move the post to the garbage can. Where only we can then see it (for later use). I changed the email template to include the post in the email. If we reply to the post, will it email them with what we put? Is there away to do checks like everything else to see if they can view the thread before it shows or emails them.

Bothan Jedi
08-02-2002, 02:21 AM
Originally posted by MarkyBuzz

pipe to |/home/mtbnet/public_html/getpost.php
generated by postreply@mtbnetworx.com
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command:
/home/mtbnet/public_html/getpost.php


i had the same problem. try adding /usr/bin/php before the script name e.g. your mail entry may look like this -

postreply@mtbnetworx.com "|/usr/bin/php /home/mtbnet/public_html/getpost.php"

BlueVoltage
08-28-2002, 11:57 PM
I installed the hack and checked everything over twice! Then I had my host install the email pipe exactly as directed in the readme.txt, and yet the hack refuses to work.

I just keep getting these errors:


A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/xelerix/public_html/forums/getpost.php
generated by post@xelerix.com <mailto:post@xelerix.com>
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command:
/home/xelerix/public_html/forums/getpost.php


My host insists that everything is installed correctly.

tacoX
09-03-2002, 08:50 PM
Looks like another rip of yaxay! *Looks Up* thanks chen...

Linux
10-02-2002, 03:50 AM
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable)

me too I had the same problem , any tips or solution ?

PhotoGenie
10-22-2002, 12:45 AM
Can anyone tell me what to do to get the emails sent from the relpy's to show the content of the post. Like the emails I get here that say...

Here are the contents of the post:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well, I'm glad that no one wants to help me out. */sarcasm* :p
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I didn't see anything in the code changes to add this. Thanks

ChurchMedia
12-28-2002, 11:34 PM
Has anyone actually got this to work? I don't see any reference in the instructions to getpost.php other than "don't put it in your public directory". So, I'm not sure how to apply it.

Also, it creates an error when replying after I make the mods:

Database error in vBulletin 2.2.9:

Invalid SQL: SELECT user.*,userfield.field8
FROM subscribethread,user,userfield
WHERE subscribethread.threadid='1'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
AND usergroup.usergroupid=user.usergroupid
AND user.userid<>'1'
AND user.usergroupid<>'3'
AND usergroup.canview = 1
AND user.lastactivity>'1041124392' mysql error: Unknown table 'usergroup' in where clause

mysql error number: 1109


The usergroup table shows up and seems to be okay. Any ideas?

Thanks!

SemperFidelis
12-30-2002, 08:03 AM
Hmmm
Im getting the exact same error as ChurchMedia
(running vb 2.2.9)

Database error in vBulletin 2.2.9:

Invalid SQL: SELECT user.*,userfield.field5
FROM subscribethread,user,userfield
WHERE subscribethread.threadid='2'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
AND usergroup.usergroupid=user.usergroupid
AND user.userid<>'1'
AND user.usergroupid<>'3'
AND usergroup.canview = 1
AND user.lastactivity>'1041223298' mysql error: Unknown table 'usergroup' in where clause

mysql error number: 1109

Date: Monday 30th of December 2002 06:03:50 PM


Anyone got any ideas on this one ?

Xenon
12-30-2002, 02:14 PM
your query is incorrect
instead of this:
SELECT user.*,userfield.field5
FROM subscribethread,user,userfield
WHERE subscribethread.threadid

it should be this:
SELECT user.*,userfield.field5
FROM subscribethread,user,userfield,usergroup
WHERE subscribethread.threadid

Mystis
12-30-2002, 09:51 PM
Thanks for releasing it Firefly, I learned quite a bit studying the code!

SemperFidelis
12-30-2002, 11:26 PM
Cheers Xenon
That has fixed it all up
:D

NuclioN
01-03-2003, 04:24 PM
.procmailrc solution:
_____________________

:0
* (^To:|^CC:|^Cc:) .*emailadres@domain.ltd
|/usr/bin/php4 /path/to/getpost.php
_____________________
cyberty.nl

NuclioN
01-03-2003, 04:30 PM
if you get problems with that mysql_connect is an invalid option, edit your php.ini file (OF YOUR CGI PHP, debian /etc/php/cgi/php.ini) and add extenstion=mysql.so
_______

NuclioN
01-08-2003, 03:05 AM
Altough the mail pipe is working correct, members having problems with the reply errormail. This errormail is blanc.
Sometimes a mailed reply is succesfull, other times not. And wierd is that the admins are instantly got the "U have no permission etc" error-logout message when they check the reply on the forum after sending it trough mail. (??)

USODJA
02-02-2003, 01:48 PM
Database error in vBulletin 2.2.9:

Invalid SQL: SELECT user.*,userfield.field16
FROM subscribethread,user,userfield
WHERE subscribethread.threadid='665'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
AND
usergroup.usergroupid=user.usergroupid
AND user.userid<>'79'
AND user.usergroupid<>'3'
AND usergroup.canview = 1
AND user.lastactivity>'1044170812'
mysql error: Unknown table 'usergroup' in where clause

mysql error number: 1109

Kars10
02-02-2003, 01:49 PM
@ USODJA, look @ Post 46...

USODJA
02-02-2003, 02:21 PM
Thanks, that worked, now for the pipeline...LOL

And put on glasses to see other posts....

mcyates
02-05-2003, 02:25 PM
Sorry i'm stupid, BUT how do i change this, what file / database table

Originally posted by Xenon
your query is incorrect
instead of this:
SELECT user.*,userfield.field5
FROM subscribethread,user,userfield
WHERE subscribethread.threadid

it should be this:
SELECT user.*,userfield.field5
FROM subscribethread,user,userfield,usergroup
WHERE subscribethread.threadid

squawell
02-05-2003, 02:26 PM
i have a problem....

when i get the mail....what should i do next ???

ex:how to reply??can someone give me some screenshot will be easy understand....because i confused....

thankz.....

USODJA
02-06-2003, 06:08 PM
Originally posted by mcyates
Sorry i'm stupid, BUT how do i change this, what file / database table



Functions.php ...

sabret00the
02-23-2003, 12:16 PM
In functions.php, replace this:
---- start code ----------------------------------------------------------
$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
---- end code ------------------------------------------------------------
With this:
---- start code ----------------------------------------------------------
$fieldid = 7; // ID of the email password field in the user's profile
$useremails=$DB_site->query("SELECT user.*,userfield.field$fieldid
FROM subscribethread,user,usergroup,userfield
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
---- end code ------------------------------------------------------------


my functions.php aint got that, it might have something do with another hack, i got something similar so i might try editing that, just wanna make sure i don't thuck anything else up

Big Daddy Chemo
03-02-2003, 04:41 PM
This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/bdcnut2/public_html/forum/getpost.php
generated by post@*MYDOMAIN*.com
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command:
/home/bdcnut2/public_html/forum/getpost.php
Can someone help me out here? I see there were others with the same error message so if you have worked through this with Exim please share the knowledge.

Now, I have a dedicated server and I added the pipe in my alias file (etc/valiases/mydomain.com). At the command line I ran newaliases. Still get the above error.

I then deleted the entry, newaliases at the command line, and added them through cPanel6. Still the same error.

Little help from the knowledgeable?

Chemo

amp2000
05-02-2003, 05:37 PM
I've been trying this all day & am getting really confused, I have vBulletin 2.3.0 & have tried to install it with that, but my replies never go into the Forum.
in the code_changes.txt it says
In functions.php, replace this:
---- start code ----------------------------------------------------------
$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
---- end code ------------------------------------------------------------
With this:
---- start code ----------------------------------------------------------
$fieldid = 7; // ID of the email password field in the user's profile
$useremails=$DB_site->query("SELECT user.*,userfield.field$fieldid
FROM subscribethread,user,userfield
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
---- end code ------------------------------------------------------------
And change the $fieldid variable to the right field ID.

Now I dont have that in my functions.php, I have this
$useremails=$DB_site->query("SELECT user.*, style.templatesetid
FROM subscribethread,user,usergroup
LEFT JOIN style ON (IF(user.styleid=0, 1, user.styleid)=style.styleid)
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND usergroup.usergroupid=user.usergroupid
AND user.userid<>'$userid'
AND user.usergroupid<>'3'
AND usergroup.canview = 1
AND user.lastactivity>'$lastposttime[dateline]'");


so I replaced it with this
$fieldid = 5; // ID of the email password field in the user's profile
$useremails=$DB_site->query("SELECT user.*,userfield.field$fieldid, style.templatesetid
FROM subscribethread,user,usergroup,userfield
LEFT JOIN style ON (IF(user.styleid=0, 1, user.styleid)=style.styleid)
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid
AND usergroup.usergroupid=user.usergroupid
AND user.userid<>'$userid'
AND user.usergroupid<>'3'
AND usergroup.canview = 1
AND user.lastactivity>'$lastposttime[dateline]'");
I think that is right. I have also figured out the pipe with the e-mail by putting post: | /usr/bin/php /tmp/getpost.php in my /etc/aliases file & restarted postfix & ran newaliases
Now here is where I get really confused, I receive the email telling me there was a reply to my post & I reply to it by replying to the e-mail but the post never makes it to the forum. If I dont have getpost.php world writable I get an error in my delivery failure report saying permission denied on getpost.php.
If I do have getpost.php world writable my reply is appended to the end of getpost.php.

Any ideas what's going on here people???

Thanks in advance for any replies.

amp2000

Crazy Pete
05-11-2003, 06:26 AM
Ok this hack doesn't seem to want to work for me for some reason. I edited the email_notify template, yet everytime I test it out and I get the e-mail notification sent to me, it still shows up as the default template without the additions I made to it. What's going on? I'm running 2.3.0 also.

Crazy Pete
05-11-2003, 06:33 AM
Yep, I just tried it again. Replaced the whole email_notify template with just "TESTTESTTESTTESTTESTTEST" and its still sending me the default template when someone replies to a thread. ??

Crazy Pete
05-12-2003, 11:53 AM
Still wondering why this isn't using my modified email_notify template. Anyone know?

Crazy Pete
05-14-2003, 01:17 PM
Can someone please post an updated version of this that works with vB 2.3.0? Apparently there are a few differences in the code from 2.2.x to 2.3.0, because it doesn't want to work correctly for me.

amp2000
05-14-2003, 06:30 PM
05-11-03 at 08:26 AM Crazy Pete said this in Post #61 (https://vborg.vbsupport.ru/showthread.php?postid=393560#post393560)
Ok this hack doesn't seem to want to work for me for some reason. I edited the email_notify template, yet everytime I test it out and I get the e-mail notification sent to me, it still shows up as the default template without the additions I made to it. What's going on? I'm running 2.3.0 also.

What have you got working so far ? If you reply to the mail will it post the reply back into the forum it came from???
I was trying this a few days ago & was receiving the e-mail, but when I replied to the mail the reply never went into the forum :rolleyes:

Crazy Pete
05-14-2003, 06:33 PM
I never get the e-mail with the threadid or anything in it, I just get the standard notification e-mail. What changes did you make to functions.php? Maybe I didn't change the correct things?

amp2000
05-14-2003, 07:13 PM
I'm still very new to vBulletin so forgive me if this is a stupid question, but do you receive the following in your notification e-mail ??

You can now reply to the thread by replying to this message. All you need to do is to make sure this code appears in the email subject:
[thread-5-]
You should also remove this text to ensure your reply is readable by other forum users.

Lemme know ;)

I did make some changes that werent in the readme to get this far but I've a bigger problem at the moment (98% of registered users arent showing up in my members list, ahhh) so I cant tell you exactly where I made the changes till i have this problem sorted.

amp2000

Crazy Pete
05-14-2003, 07:17 PM
Today at 04:13 PM amp2000 said this in Post #67 (https://vborg.vbsupport.ru/showthread.php?postid=395127#post395127)
I'm still very new to vBulletin so forgive me if this is a stupid question, but do you receive the following in your notification e-mail ??

You can now reply to the thread by replying to this message. All you need to do is to make sure this code appears in the email subject:
[thread-5-]
You should also remove this text to ensure your reply is readable by other forum users.

Lemme know ;)


Nope, I don't get that at all. I just the standard e-mail notification template without the additions from this hack.

amp2000
05-14-2003, 07:56 PM
Heres what i done to my my email template so far if it helps you
Hello $touser[username],

$bbuserinfo[username] has just replied to a thread you have subscribed to entitled -
$threadinfo[title] - in the $foruminfo[title] forum of $bbtitle.
New at $bbtitle!
You can now reply to the thread by replying to this message. All you need to do is to
make sure this code appears in the email subject:
[thread-$threadinfo[threadid]-$touser[field5]]
You should also remove this text to ensure your reply is readable by other forum users.

This thread is located at:
$bburl/showthread.php?threadid=$threadinfo[threadid]&goto=newpost

There may be other replies also, but you will not receive any more notifications until
you visit the board again.

Yours,
$bbtitle team

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:

To unsubscribe from this thread, please visit this page:
$bburl/member2.php?action=usub&threadid=$threadinfo[threadid]

To unsubscribe from ALL threads, please visit this page:
$bburl/member2.php?action=usub&type=allthread

I'm not sure but [thread-$threadinfo[threadid]-$touser[field5]] dosent look like correct syntax to me so you might want to start there (I could be wrong though)

Let me know how you get on :D

Crazy Pete
05-15-2003, 02:20 PM
Hrm, well I think I'll have to uninstall this hack at least for now because no matter what I try and do, it's not updating my email_notify template with the new changes. Without even that working, I'm at a loss for now.

amp2000
05-15-2003, 07:06 PM
Today at 04:20 PM Crazy Pete said this in Post #70 (https://vborg.vbsupport.ru/showthread.php?postid=395462#post395462)
Hrm, well I think I'll have to uninstall this hack at least for now because no matter what I try and do, it's not updating my email_notify template with the new changes. Without even that working, I'm at a loss for now.

I'll take another look at this hack tomorrow or next week sometime & get it working, I have to!

Crazy pete, if you updated your email_notify template with the new changes & they dont take effect I think your problem is somewhere else mate, u sure your updating the correct template ?? I don't know what sort of a machine your installing this on so I cant really help ya anymore at the moment.

amp2000

Crazy Pete
05-15-2003, 07:10 PM
Well it's odd. I looked at the database when I had this hack installed and saw two templates called email_notify. One of them had the templatesid of -1, which was the original template, then there was one with a templatesid of 1, which was the one I'd edited with the changes.

For some reason it never wanted to send me e-mails with the updated one, though it showed up correctly if I went to templates -> edit -> email_notify. I dunno. I appreciate the tips though. :)

dodgy
05-20-2003, 01:33 AM
running:


UPDATE userfield SET field# = SUBSTRING(MD5(userid) FROM 10 FOR 5);


says:

Error
SQL-query :

UPDATE userfield SET field5 = SUBSTRING(MD5(userid) FROM 10 FOR 5)

MySQL said:


You have an error in your SQL syntax near '(userid) FROM 10 FOR 5)' at line 1

also code is different in 2.30


In functions.php, replace this:
---- start code ----------------------------------------------------------
$useremails=$DB_site->query("SELECT user.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
---- end code ------------------------------------------------------------


differnet!


---- start code ----------------------------------------------------------
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
---- end code ------------------------------------------------------------


doesnt exist!


In showthread.php, add this:
---- start code ----------------------------------------------------------
if ($emailpostdata > 0) {
$noinclude = 1;
include('./procpost.php');
}


note that procpost is located in parent folder (as recommendation)


In the email_notify template, add this:
---- start code ----------------------------------------------------------
~~~~~ NEW ~~~~~
New at $bbtitle!
You can now reply to the thread by replying to this message. All you need to do is to make sure this code appears in the email subject:
[thread-$threadinfo[threadid]-$touser[field7]]
You should also remove this text to ensure your reply is readable by other forum users.
~~~~~ NEW ~~~~~


change of field7 not mentioned


.. just saying its not easy to install. not working on mine yet:(

dodgy
05-20-2003, 04:10 AM
having same problems as Crazy Pete

i think this problem has something to do with this part:


$useremails=$DB_site->query("SELECT user.*,userfield.field$fieldid
FROM subscribethread,user,userfield,usergroup
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
...

dodgy
05-20-2003, 05:30 AM
05-11-03 at 08:33 AM Crazy Pete said this in Post #62 (https://vborg.vbsupport.ru/showthread.php?postid=393562#post393562)
Yep, I just tried it again. Replaced the whole email_notify template with just "TESTTESTTESTTESTTESTTEST" and its still sending me the default template when someone replies to a thread. ??


yep.. found the prob. 2.3 needs to query style as well. try this one:


$fieldid = 5; // ID of the email password field in the user's profile
$useremails=$DB_site->query("SELECT user.*, style.templatesetid, userfield.field$fieldid
FROM subscribethread,user,userfield,usergroup
LEFT JOIN style ON (IF(user.styleid=0, 1, user.styleid)=style.styleid)
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND userfield.userid=user.userid


subject line is missing tho:(

Crazy Pete
05-20-2003, 01:36 PM
What did you change the e-mail query to, too? Since 2.3.0 uses the vbmail() function instead.

amp2000
05-21-2003, 08:06 AM
Crazy Pete, I remember having a similar problem but thought 2.3.0 used the mail() function.
If what you said above is correct just replace mail() with vbmail()
Thats what i done.

dodgy
05-22-2003, 04:22 AM
e-mail thing was easy..

find:


// work out the 'From' header
if ($from == '') {
$headers = "From: \"$bbtitle Mailer\" <$webmasteremail>\r\n" . $headers;


and replace with


// work out the 'From' header
if ($from == '') {
$fromemail = 'CrazyPete@vbulleting.org';
$headers = "From: \"$bbtitle Mailer\" <$fromemail>\r\n" . $headers;


although.. I might have to unistall it coz I cant run getpost.php.. i dont know how other ppl do it but php scripts can only be runned within web enviroment and.. umm im lost:)

dodgy
05-22-2003, 04:25 AM
01-03-03 at 07:24 PM NuclioN said this in Post #49 (https://vborg.vbsupport.ru/showthread.php?postid=337992#post337992)
.procmailrc solution:
_____________________

:0
* (^To:|^CC:|^Cc:) .*emailadres@domain.ltd
|/usr/bin/php4 /path/to/getpost.php
_____________________
cyberty.nl


how can procmailrc execute php script?

dodgy
05-22-2003, 05:57 AM
:laugh: :laugh:

it works! fiiiiinallllyyyy!!!

Crazy Pete
05-22-2003, 04:01 PM
Does the subject send too, dodgy? If so, what did you change your query to? What amp2000 had?

dodgy
05-22-2003, 11:16 PM
Nope.. subject field is still empty. trying to figure it out but I'm running out of ideas:(

Crazy Pete
05-25-2003, 06:08 AM
Ok it works for me now, I just have two little quirks.

First, how do I get the subject to automatically include the required info to reply? Like the [threadidxxxx] thing as on here?

Secondly, it appears that in the email, the password is open for viewing. Whereas on here it says something like [thread-53352-], on mine it says [thread-53352-xxxx] where xxxx is the e-mail password. Shouldn't that not be showing up?

Crazy Pete
05-25-2003, 06:18 AM
Ah nevermind. I figured out the first part by editing the email_notify subject template. Also I think the second question is because I'm the admin, so it should show up for me but not for regular members. I'll have to try it with my regular member test account and see.

This is pretty cool though!

dodgy
05-26-2003, 04:00 AM
my e-mail notify subject field still appears empty. tho postemail_emailerror and all other e-mails by forum subject fields are ok.

emailsubject_notify is also ok. has Reply to post $threadinfo[title] in it.

I guess I've f$%#ed something up in code.

dodgy
05-30-2003, 01:28 AM
I've done some minor changes in procpost.php so that you can post messages from any e-mail account by using user name and password in subject line like this:

[thread-123-user-password]

reason for that is to be able to send posts from mobile phones, airplanes etc.

not sure about security holes yet


/* Get needed data from headers */
if (preg_match('#\[post-([0-9]+)-([a-z0-9]+)-([a-z0-9]+)\]#i', $headers['subject'], $subjectparts)) {
$postid = intval($subjectparts[1]);
} else {
preg_match('#\[thread-([0-9]+)-([a-z0-9]+)-([a-z0-9]+)\]#i', $headers['subject'], $subjectparts);
$threadid = intval($subjectparts[1]);
}
preg_match('#([-.a-z0-9_]+@[-.a-z0-9_)]*)#i', $headers['from'], $emailparts);

/* Move data to new variables */
$email = $emailparts[1];
$emailuser = $subjectparts[2];
$emailcode = $subjectparts[3];
$title = str_replace('[thread-'.$threadid.'-'.$emailuser.'-'.$emailcode.']', '', str_replace('[post-'.$postid.'-'.$emailuser.'-'.$emailcode.']', '', $headers['subject']));
$message = trim(str_replace('[thread-'.$threadid.'-'.$emailuser.'-'.$emailcode.']', '', str_replace('[post-'.$postid.'-'.$emailuser.'-'.$emailcode.']', '', $d_message['text'][0])));

/* Get the user info by the email */
$bbuserinfo = $DB_site->query_first("
SELECT user.*, userfield.field'.$_config['fieldid'].'
FROM user
LEFT JOIN userfield USING (userid)
WHERE username = '$emailuser'
");

/* And make sure it's not a phoney */
if (!$bbuserinfo) {
mailerror('Invalid user: user name does not exist.');
continue;
} elseif (empty($bbuserinfo['field'.$_config['fieldid']])) {
mailerror('No email password: you did not specify an email password in your profile, and cannot post through email.');
continue;
} elseif ($bbuserinfo['field'.$_config['fieldid']] != $emailcode) {
mailerror('Invalid email password: the email password you specifed does not match the one in the database.');
continue;
}


obviously you will have to edit templates and insert $emailuser where ever it needs to. ($emailuser is user name)

iggy123
06-05-2003, 09:32 PM
if someone figures out how to work this in 2.3 can you let me know, I can't see any of the code that requires changing in the showthread.php or some of the code from the funcitons.php

dodgy
06-05-2003, 11:45 PM
Yesterday at 11:32 PM iggy123 said this in Post #87 (https://vborg.vbsupport.ru/showthread.php?postid=404921#post404921)
if someone figures out how to work this in 2.3 can you let me know, I can't see any of the code that requires changing in the showthread.php or some of the code from the funcitons.php


last few pages are about this issue.

anywhereanytime
07-06-2003, 02:23 AM
We need this BADLY but want to move to vB3, I am crossing my fingers that it will work ... soon ???

If not we are on VB 2.3 ... was that fixed ??

john_rsd
08-05-2003, 10:05 PM
I hope that when this board is updated to vb3 that the hack will also be kindly updated.

Would really like to see this working with vb3

AmericanWoman
08-29-2003, 06:22 PM
I know Firefly isn't supporting this, but perhaps someone else can help. My error hasn't been discussed yet, and it looks like it's not parsing the PHP. At first, the file was located outside the public HTML directories, but I decided to try it inside to see if THAT would correct it - no such luck. Here's what happens when I send the reply email and it hits getpost.php (which is getposts.php on my system because my server admin set up the pipe that way):

The original message was received at Fri, 29 Aug 2003 15:22:34 -0400 from XXXXX [XXXXX]

----- The following addresses had permanent fatal errors ----- "|/usr/local/apache/htdocs/forums/admin/getposts.php"
(reason: 2)
(expanded from: <newreply@acuraworld.com>)

----- Transcript of session follows -----
/etc/smrsh/getposts.php: ?php: No such file or directory
/etc/smrsh/getposts.php: //: is a directory
/etc/smrsh/getposts.php: //: is a directory
/etc/smrsh/getposts.php: //: is a directory
/etc/smrsh/getposts.php: //: is a directory
/etc/smrsh/getposts.php: //: is a directory
/etc/smrsh/getposts.php: line 8: syntax error near unexpected token `array('
/etc/smrsh/getposts.php: line 8: `$config = array( ####'
554 5.3.0 unknown mailer error 2


Any help would be appreciated. :(

AmericanWoman
09-01-2003, 09:28 PM
Fixed. For anyone else who has the same issue - it's caused by the way PHP is compiled to run and treat scripts. :)

Awesome hack.

john_rsd
09-24-2003, 08:46 PM
Just wondering if this mod has been updated and installed on vb3 beta on this site? anyone know?

Thanks

John

dodgy
10-27-2003, 11:48 PM
Wondering if its possible to modify this hack to support attachments? Say jpegs or gifs? (idea is to post messages and images with mobile phone that has camera.. while sitting on the beach :) )

otherwise i've fixed email notification subject line issue and some other minor probs with vb2.3 if anyone's still interested :-P Works beatiful with msn hotmail mobile services (get thread reply on your phone and just sms back "R blablabla")

Bashar
03-13-2005, 09:59 AM
anyone tried it for v3?

Xenon
04-07-2005, 05:47 PM
there is a email posts into a vb3 modification :)

I'm not sure who did it, but it is there.

ataraxia
03-11-2007, 12:35 PM
Is anyone aware of a newer mod with email post functionality for vB 3.5 or later???

Why hasn't the vB team incorporated something like this directly into vB? It seems like such a logical addition!:confused:

Thanks

InfoNirvana
05-28-2007, 06:27 PM
I'd like to be able to do this.
Any options ?

Bashar
06-08-2007, 03:59 PM
Is anyone aware of a newer mod with email post functionality for vB 3.5 or later???

Why hasn't the vB team incorporated something like this directly into vB? It seems like such a logical addition!:confused:

Thanks

have you found anything for 3.5.x ?