For those wanting to post by email.

Started by Grudge, July 01, 2005, 05:09:12 PM

Previous topic - Next topic

Grudge

I've seen lots of discussion recently on people wanting to reply to notifications etc through email. [Unknown] has added some handy code to SMF 1.1 which will allow SMF to work fairly well with handling replies made through email from notifications etc. I've attached a script to this post which will, in theory, allow users of your forum to reply to notification emails and have their post put directly onto the forum. Please note that I did not write the majority of the code, [Unknown] did, I've meerly added to it so it actually does the donkey work of making the post.

There are some important things to note before testing this on your server:
1) This is *not* secure. Although it should not cause any damage to your server there is no true protection to stop people spoofing other users email addresses and making posts as someone else. If you use this you should be aware of this issue. I hope to build a mod in the future which will make posting through this method much more secure - but at the moment it does have this area open.
2) This is beta - it may not work properly on all mail clients and/or servers. I am releasing this to get feedback on what it does and doesn't do correctly so I can build on it and improve it.
3) This will ONLY work with SMF 1.1 - do not try it on 1.0.x it will not work!!

I stress this is a beta script - and should only really be used to do some testing and see how it works. I cannot test these things on my own so any feedback is appreciated. Note that it will only currently work replying to topic/message notifications - not personal message notifications.

If you got here and still want to try it out the instructions are quite simple - I'm going to assume you are using cPanel as I have no experience of anything else:
1) Upload the script to your SMF directory
2) In cPanel go into Email -> Forwarding and then make the forum's email address forward to "|/home/path/to/SMF/smf_email.php" without quotes. Where the path is the path to the script (Note that path - not the URL!)

The forums email address should be the one you use on SMF. Note that the script includes some debugging which will send the forum email address an email if anything goes wrong and doesn't work.

Finally, please note that if you test this script a LOT there is a good chance your server might think the incoming mail from your address is spam and block it - check your spam filters on your server as well as your ISP. If the script suddenly stops working this is probably why!

Cheers,

Grudge
I'm only a half geek really...

rhizome

Wow, that was quick Grudge!

I'm going upload 1.1 on a test forum and will try out the script.

Grudge

The script has been written for a month or two - it's just 1.1 hasn't been in the public domain for that long :)
I'm only a half geek really...

ynneb

Thanks for coming to the party and realeseing the beta.
I will give it a test too. I
I willl leave lots of feedback.

Grudge

Check out:

http://www.simplemachines.org/community/index.php?topic=40650

I've turned this into a mod - it will now also do replies by personal messages AND does everything in a nice secure manner. Please provide any feedback in the thread above.
I'm only a half geek really...

tborden

Grudge,
     I installed your post to email mod I set the path correctly in your mail forward, but still I got this :

Error in argument 1, char 3: option not found

Either the script is broke or the pipe command is using the wrong
syntax.

do you have any ideas.

pjkwis

I need a module like this.  However, I am running PHP on a shared Windows box.  Will this work?  Thanks!

Advertisement: