Closed Thread Icon

Topic awaiting preservation: Post to php page via email (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12929" title="Pages that link to Topic awaiting preservation: Post to php page via email (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Post to php page via email <span class="small">(Page 1 of 1)</span>\

 
Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 10-12-2003 10:19

I'm sure you all have seen how yahoo groups and such have little chat pages that you can post to by sending an email to a specific address right?

Could anyone help me understand more about how thats done? What php functions I might need, etc...

I've got a friend that wants to set something small like that for his study group and he doesn't want to use a service like yahoo etc... He asked me to help and naturally I said I'd try but lol it would sure help if I had some idea of how it's actually done

I'll go googleize the theroy for now, but as always any help is appreciated

Synthetic's Chess Player Page

[This message has been edited by Synthetic (edited 10-12-2003).]

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 10-12-2003 10:55

well, PHP does have functions for retrieving mail, you could do a script as a cron job, have it retrieve the contents of the site's inbox once an hour, every couple of hours, once a day, whatever...examine the headers to get the sender's email address, match that to the records to put the correct name on the post and use the body of the email as the post text...just let me go look up the correct functions to do this with.

[edit]Here you go...the imap functions in PHP will allow you to open and retrieve all messages from your email inbox and seperate the message body and headers and do with them what you wish, short of breeding with them.[/edit]

[This message has been edited by Skaarjj (edited 10-12-2003).]

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 10-12-2003 16:43

well, there is the imap and pop3 extension for php,
which should be easy enough to use, provided you can get your host to supply the necessary extension.
If you can do an fsockopen, you still could talk to a pop server fairly easily...
but most hosts don't allow that (as server sockets are a quite limited resource).

The next alternative I'd see was having a local program on some machine that is regularly connected to the internet, that checks for mail
every few minutes, and if it finds any, posts it to the web site.
This could probably done in just about anything ;-).

Holler, if you need more help,
TP

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 10-13-2003 02:41

If the host has Procmail installed you could use it to filter any mail sent to your *chat* address to a script that would read the mail and then post it to your web page. I did something like this once for somebody that wanted to be able to admin a certain aspect of their site from an email on their cell phone.

I don't know if it would be a stumbling block for you, or if it would even be an issue on your hosts system, but I had to write the script that handled the mail in PERL for it to work on my host because they said that PHP wasn't installed on the mail server. I don't know a lot of PERL, but it has a very nice module for handling mail that made it pretty straight forward even for me.

-Butcher-

[This message has been edited by butcher (edited 10-13-2003).]

Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 10-16-2003 16:41

Thanks guys i'll go check out imap, and yeah i'll have to look into that script too procmail too it sounds interesting

Synthetic's Chess Player Page

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-16-2003 18:06

Just a note, the IMAP or POP3 will depend on your mail server type. You can't pick the protocol.



.:[ Never resist a perfect moment ]:.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 10-29-2003 14:45

Started an FAQ on this as I was fiddling with related FAQs

:FAQ: How do I receive SMS text messages on my web site?

___________________
Emps

The Emperor dot org

« BackwardsOnwards »

Show Forum Drop Down Menu