Forum Moderators: coopster

Message Too Old, No Replies

adding to a database via email

running a script upon receipt of email

         

bofe

8:34 pm on May 18, 2005 (gmt 0)

10+ Year Member



are there any easy ways to do this?

theoretically I want this to happen: (without using another service like mfop2)

1 user e-mails a unique address,
2 the email is processed,
3 new post is made in MT.

I can handle the new post making in MT... I'm just not sure how step 3 can happen on the fly.

any ideas? thanks.

moltar

8:49 pm on May 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can forward your email to a script. How would you go about it depends on your system and configuration. There are many different ones.

This is an example for qmail, but it also may be different depending on your system.

Create

.qmail-mt_post
file in your root directory (e.g.
/home/bofe
). Put a single line in the file pointing to your parsing script.

¦/usr/bofe/mt_post.pl

(Note that ¦ character is actually a pipe character. The forum software replaces it with a broken pipe. You need to convert it back)

Now all the email sent to mt_post@example.com will be redirected to <STDIN> of the mt_post.pl script.

P.S. I think sendmail uses

.alias
file in root directory with a slightly different syntax.
P.S.S. Some control panels allow you to create aliases that point to scripts.

bofe

8:56 pm on May 18, 2005 (gmt 0)

10+ Year Member



Wow, thank you so much for such a prompt response.

Another reason why I love webmasterworld.

jatar_k

9:50 pm on May 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



we have used [procmail.org...] for this in the past

ergophobe

1:27 am on May 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



evolt has a sort of tutorial on the subject too

[evolt.org...]