johnsmith153 — 2012-03-08T22:34:58-05:00 — #1
Not sure where to start, and it may not be entirely PHP.
I am helping a friend with a small social network (5,000 users). They want to add a feature where each user gets given their own email account in the format firstname.lastname@example.org with domain.com being the domain of the social network.
Is this too much? I've never thought of anything like this before.
How would we create the email accounts? Can PHP do it? Would it be an API through the web host / email space provider?
doug_g — 2012-03-09T19:51:53-05:00 — #2
You create email accounts on your email server. Depending on your mail host you may or may not be able to automate the process of creating mail users.
samanime — 2012-03-10T02:08:28-05:00 — #3
Yeah, this isn't really something you handle with PHP. PHP is generally run through a web server. Email is run through a mail server. Two different bits of hardware.
If you are running on a VPS or some other dedicated server, you can configure this yourself. It'd also be possible to have PHP to call some commands on the server which can generate the emails automatically.
However, if you are on a shared host, it's unlikely you'll be able to do automatic generation (and likely you won't even be able to get that many email accounts).
Also keep in mind that each email account will need space. If you only give them 10 MB (a crazy small amount), you are still talking about 50GB of space.