DEVTRENCH.COM

How To Mass Create Email Addresses In cPanel

Creating a lot of email address in cPanel can be a real pain the neck considering that there is no way to create multiple email addresses at once. However, this task can be accomplished with iMacros, a macro plugin for Firefox, and a bit of php.

If you don't have iMacros installed, get it here. Once you get that installed, here are the steps.

Create your iMacros Script

Here is where you need some php skills. You'll need a list of your email addresses (username only), and passwords. These should be in a comma separated list like this:

jamese,sup3rs3cr3t
maxp,sh0p3rs7ar
jeremys,madsk1llz

Read on to get the php script...

Use this php script to generate the iMacros code. It just loops over your list and places the username and password into the right spots:

Back\n";
}
?>

The only thing you need to change in the script is the line that reads:
URL GOTO=http://www.mysite.com:2082/frontend/x3/mail/pops.html

Basically you need to login to cpanel, click on your Add/Remove Email Accounts or Email Accounts (it varies depending on your theme) to get that URL. Just to be totally clear, this is the page where you add email addresses. The url of that page is what needs to go on that line.

I run this code from my computer with WAMP, but you could run it from any server that supports PHP. After you run the script, just copy the results.

Read on to figure out how to make this work with iMacros...

Now start up Firefox, and start iMacros (there should be a button in your toolbar to open it).

  1. In the iMacro window click on the Edit tab.
  2. Select #Current.iim, and click on Edit Macro.
  3. Paste the results from the php script into the window that opens (mine opens in notepad), and save it.
  4. Now you just have to login to cpanel, and then Play the macro.
    (Optionally you can record a bogus macro, save that and then edit it if you want to save this macro for future use)

And that's it. I know this tutorial will be out of date as soon as cPanel updates to a new default theme, and the exact iMacros code will be a bit different if you are using a different theme, but I hope this can act as a guide for you on how to do this. I guarantee that figuring out how to do this will be way faster than entering 100+ emails individually.