tags:

views:

339

answers:

4

Im trying to make something similar to twitpic.com's email submission feature.

Their address schema is something like [email protected]. When you send an email to that address it processes it and uploads your picture.

What im wondering is how they generate and handle those addresses in php. I know how to pipe a single email address to a program using cpanel, but how is this done dynamically?

Ill settle on what this is even called or some google search results so i can do my own research, but i just want a place to start.

+1  A: 

There's an option in cpanel to set a default address that catches all email sent to addresses that don't exist. This is probably the easiest way to do it.

In fact, in the version of cpanel I have, if you go to Default Address, and go to Advanced Options there an option to pipe to a program all mail without a valid address.

Cahlroisse
Im aware of this functionality, but i need to do this dynamically from a php script.
Patrick
If you're piping ALL emails that aren't going to an existing mailbox, you can simply check the "to" address in php to see what email address it was addressed to, so there is no need to create for for every email address you need.
Cahlroisse
I see what your saying, much simpler approach. Im going to investigate this.
Patrick
A: 

Ok i found this.
http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/Api2AddForwarder
Trying to find out how/where i can do this using PHP

update
Found a cpanel api class here
http://www.phpclasses.org/browse/file/17045.html
Im trying to contact the author of the class to see how to add the functionality of the api to that class (which can already handle creation of forwarders)

Patrick
A: 

Hi did you ever figure this out? If so, could you explain all the steps you took?

jen
A: 

Hi, I'm trying to figure out how to do something similar, bust instead of piping the emails to a script I'd like to know how to actually setup an e-mail account when a user signs up for my site (so they can have webmail access for instance). Like the OP I'd settle for a good term with which I could google search for this information.

awls99