This completely depends on how your email is setup.
Given a dedicated server or vps your can setup virtual email accounts (these are email accounts that do not require a login on the actual machine) and most smtp servers can read user information from a database. So, once this is setup it is as simple as adding new entries to this database.
Having said that however, unless you know a fair bit about Linux server administration (and obviously you don't given your asking this question), I would not advise going down this path.
I use Google Apps for all my email these days and they do provide this sort of functionality through there API's, there are probably many other email providers that do the same.