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.