zubrag.com
Free php and cpanel scripts to automate your daily routine

Free PHP Scripts :: cPanel Email Account Creator

Create new email accounts on cPanel based hosting with just typing all the required data in URL. No need to login to cPanel. Provide cPanel login and password once, and just use this script each time you need new email account.

Will show input form if ran without parameters. Can be setup to avoid spam using CAPTCHA.

Usage:
  • Update script with your cPanel login, password, skin (once)
  • When running script to create new email account, provide following data:
    • user - new account name
    • pass - password for new email account
    • domain - email domain (optional)
    • quota - email quota in megabytes (optional)

Sample:
cpemail.php?user=newuser&pass=password&quota=50

Download cPanel Email Account Creator


Comments

August 15, 2006
cool solution:):)
September 6, 2006
I have tried this and it works great! Would be nice to allow account deletion as well... possibly something where the user can enter existing username with password and have their account deleted.

Very nice!
deepsgjain [anti-spam] yahoo.co.in October 16, 2006
Thanks for the solution, but i get some error like "Your php is running in Safe Mode" so fopen function can not be used. Is there any solution for this??
webmaster [anti-spam] usjcisenate.org November 27, 2006
Can this or a similar class be used to create forwarders instead of an entire account? For the majority of my users, this would be preferable.
? December 11, 2006
to create one account it is fine.
How to create, say 100 or 200 email accounts at one time? I have all the username in an Excel sheet. Any suggestions?
tarek.unes [anti-spam] gmail.com January 18, 2007
i get some error like "Your php is running in Safe Mode"
bob January 26, 2007
Mine doesn't work help? much?
xxpyro66xx [anti-spam] aol.com February 24, 2007
I'm looking for something almost identical to this, however I would like users to simply be able to set up forwarders (after logging in somewhere on the site, even if they don't make a mail account)
Chris March 11, 2007
My Server also doesnt do this script... I get a safe-mode php error.

Fix? Please?
rob [anti-spam] wccctv.org March 19, 2007
Script runs and reports success, however no account is created!

Attempting to create with an existing account, also reports success, but nothing changes.
faddil April 9, 2007
'tarek.unes [anti-spam] gmail.com January 18, 2007i get some error like "Your php is running in Safe Mode" '

try to change the extentsion of doaddpop from html to php or whatever your host provides you. And also your cpanel skin from 'x' to maybe 'xpevolution' or to what ever your frontend skin are.

Good Luck!!

what i need to ask the webmaster is how about to have my user to sign up by their own self.
imean how to set it up in a html form.
TQ
marcia [anti-spam] clicnet.com.br April 18, 2007
Script runs and reports success, however no account is created!
I try to create the account teste@mydomain.com.br many times, report success in any time.
June 1, 2007
Turn off safe mode.

php_value safe_mode Off

eg: http://www.sub.dn.vc
chozn1 [anti-spam] mac.com June 18, 2007
i'm looking to do this too. To create one account it is fine. How to create, say 100 or 200 email accounts at one time? I have all the username in an Excel sheet. Any suggestions?
swannie [anti-spam] intouchweb.co.za June 27, 2007
Nice,

I think it would be nice to have the client enter his domain, username, password and new email details and then enter. Then you can use one script for all your clients.
Swannie
July 12, 2007
Thanks for this.
Worked fine for us.

It would be -great- if it did indeed allow setting up of forwards, deleting, and bulk.

Can someone director me to ANY script/program that can do -any- of those additional feeatures?

We'll check here for a a reply from time to time.

neworkofemail.com
July 13, 2007
nice one. been cracking my head open for ages trying to find out how to do this for a CMS i'm building.

didn't imagine it to be so simple!
anshu [anti-spam] 9to9solutions.com July 23, 2007
The download link is not working /// :(
Samara July 24, 2007
So how to you add a page for users to login? This only allows for user account creation.
doctorkwex [anti-spam] yahoo.com August 8, 2007
Hi, my domain is using a new cpanel theme /frontend/cpanelnew/accnttools/eadoaddaccnt.html
"cpanelnew" and it runs on port 2083.

It always throws this exception that i'm running on safe mode etc .. even when i run the script from my local machine.

Any solution on why it complains of safe mode even when i know i'm not running on that?

Thanks.

Kwex.
August 9, 2007
This is the best script...

Thanks

From: Mihajlo
Location: Macedonia
August 17, 2007
If fopen is not working lookup curl it seems to work. Still working out the finer details so not posting code yet.
http://php.net/curl has some tips.

-cp
mazen.arafat [anti-spam] gmail.com August 20, 2007
HI,
It works good , just you have to change the param rvblue to x .
$cpanel=new cpmail("rubdnet","secret2001","rubd.net","rvblue");
Remotive September 13, 2007
I get the same as most people, "Your PHP is in Safe Mode." is there anyway of resolving this issue?
larryspencer001 [anti-spam] yahoo.com September 27, 2007
PLS I NEED SOMEONE HELP ME CONFIGURE THE SCRIPT SO I CAN USE IT SEND OUT MAILS
Jim October 1, 2007
Works great - the "Your PHP is in Safe Mode" is a generic message for ANY error; check your syntax and it should work.
OFFICEVEXCOR [anti-spam] GMAIL.COM October 17, 2007
is there a way to add in this script some fields like name , adress etc and save them in a database? and how?
ovisopa November 18, 2007
I want to upgrade to cpanel11, it will still work ? Any ideea ?
November 30, 2007
I am using cpanel11 and it works.
Ruchi Agrawal December 6, 2007
Thanks for your script and your suggestions. I just test it it works.
ionut_147 December 17, 2007
Incorrect antispam code entered.
admin [anti-spam] putiyavan.com December 21, 2007
antispam is not working send check cpatcha
December 23, 2007
Nothing Happens????? Like It Says Successfull But nuttin happens
techarea December 26, 2007
how this script looks for curl? any examples please!!!
thx
jes [anti-spam] andresen.ca January 11, 2008
I have set it up to work with EXCEL simply "CALCUALTE" the URL! (i.e. URL of ur site and script & username (from excel) and part two of URL & Password (from excel) and last part of url. This creates a link in excel which will ececute the creation. So I clikck the 10 - 15 links - DONE

e.g.

"http://ur_domain.com/cpemail.php?user="&LEFT(E2,FIND("@",E2)-1)&"&pass="&F2&"&quota=30"

E2 has the e-mail address (including @domain.com and f2 has the password.

Hope this helps.
jes [anti-spam] andresen.ca January 11, 2008
Modified the EXCEL above to provide a hypelink correctly:

=HYPERLINK("http://ur_domain.com/cpemail.php?user="&LEFT(E2,FIND("@",E2)-1)&"&pass="&F2&"&quota=30","CREATE account OR update password")

I ALSO modified the script to update the password IF the account already exists.

Greets to all.
jonangel6 [anti-spam] yahoo.com January 27, 2008
hi, could u show me how to setup this software on my server. i'll be grateful
vinod at vinodrawat dot com February 4, 2008
thanks a ton i'm trying to create my own, and found urs, with captcha. working fine for me :)
temperariry: http://americanfavorite.us/cpemail.php

cheers
Ale February 9, 2008
Doesn't Really WORK LOL !!!!

it Says it Created But It's not really Created...
Can u Give Me Tutorial??
rajrech [anti-spam] gmail.com February 12, 2008
in cpanel which script is better whether PHP or ASP
rajrech [anti-spam] gmail.com February 12, 2008
i wanted to change my site to ASP from PHP. please suggest me. how can i do.
webmaster [anti-spam] mattspchelp.co.uk February 14, 2008
hey guys gonna download this script and get it fixed if i can find any problems that is lol

:D
Matt
Matt February 14, 2008
Hay all. Great script zubrag! I almost have my entire site working flawlessly. I am having one little issue with the email login page.
1) First I would like to not have my customers have to type in the @xxxxxxx.com for the username. I'm sure there is a way to do this but it has escaped me.
2)When I try to login an ftp like box pops up and asks for the same info again, how can I get this to stop and just login directly? This is my website http://www.zonefyi.com. Thank you again zubrag.
Matt February 14, 2008
Oh and by the way. For anybody considering this script there is a great working example on my site. Go to www.zonefyi.com and click on the "Sign Up For Free Email" link. Once my login dilema is solved it works flawlessly! Thanks zubrag.
jrsoares2000 [anti-spam] yahoo.com February 19, 2008
antispam files (CAPTCHA) its show missing picture. I jist put font in main directory folder still it show missing pic. please help
jrsoares2000 [anti-spam] yahoo.com February 19, 2008
When I enter username, password, and CAPTCHA, it give this message "Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode" Please help
ck23pride [anti-spam] yahoo.com March 7, 2008
Please how can i create a cpanel email.and what are the reuirement.please kindly connect to friends with the ideal
Allison March 9, 2008
Hi. I'm a bit confused and hope that I can get some help before downloading. Is there a demo on this site? Also, I checked the ZoneFYI.com site and it would appear that site is running a CGI Perl script - I thought this was a PHP script. Can you offer multiple domain choices? Can it be set as a "temporary email" address solution like that found at DeadAddress.com?
sashamarar [anti-spam] hotmail.com March 27, 2008
Finally got it to work with X3 cPanel version.

You guys need to edit just some thing by opening the cpemail.php in text mode and write this :

("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&quota=$equota", "r");

("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/doaddpop.html?email=$euser&domain=$edomain&password=$epass&password=$epass&quota=$equota", "r");

For those whose antispam dont work:
Change from this :
$antispam = true;
$antispam = false;
Leave feedback to see if it worked on yours
March 29, 2008
I had the same safe mode error. I figured out I have to put in

$cpskin = 'x3'; // cPanel skin. Mostly x or x2.

Notice the 'x3' part

Make sure that the version is set correct.

Check the URL that it looks for and make sure it matches your cPanel.

Basically make sure every setting is correct.

Hopefully you had as good as luck as me!

alselwi99 [anti-spam] yahoo.com April 4, 2008
how open my email without cpanel but
the script contunt my header
mayron.guevara [anti-spam] gmail.com April 11, 2008
Great Job.
I hava a Question, How apply this Script to FTP Accounts ????? Thanks
dgb April 14, 2008
For my host (using cpanel 11 with x3 skin) I had to add a "password2" parameter to the URL in the PHP file.

If you want to see what parameters need to be passed, you can use the nifty DebugBar extension for Internet Explorer to see all the headers.
eifhglobalbiz [anti-spam] gmail.com April 15, 2008
We are unable to set this up.... Please help as soon as possible...
martinbenja April 18, 2008
i want to have this cpanel
nick April 20, 2008
so this software lets the peole who come to your site to make a acount up on it how do u use that then could some 1 email me bk nickboy2k7@hotmail.co.uk
drgarcia [anti-spam] etb.net.co April 21, 2008
some one had used wget -i to create multiple accounts? there is anoter similar command?
admin [anti-spam] nsidethebox.com April 21, 2008
Anyone have any ideas on how to fix the captcha?? if you could help me out that would be great!
jkranthikiran [anti-spam] gmail.com April 26, 2008
your code is working for unix server but can you help me out for plesk window hosting server
mrfisho [anti-spam] hotmail.com May 9, 2008
Has anyone seen a similar script for Plesk ?
sashamarar [anti-spam] hotmail.com May 11, 2008
If someone needs help,email me. I might help you...
stan.morrow [anti-spam] paramedicinfo.ca May 16, 2008
I got it to work but when a account is created i get this error. Could you please point me in the right direction.

Warning: fgets() [function.fgets]: SSL: fatal protocol error in /home3/paramedi/public_html/test/cpemail.php on line 88
stan.morrow [anti-spam] paramedicinfo.ca May 16, 2008
Thanks For the Great script, I got it work fully with no errors!!!!!
3dmurali [anti-spam] gmail.com May 25, 2008
You sir, are a God! Works perfect!
MrTom May 26, 2008
Its a fantastic script! is there a way that when you create a new account it will auto setup say a webmail like squirrelmail ?
admin [anti-spam] gooadv.com June 22, 2008
hi, i have problem Your antispam not work the images don't come out..y? can u help me
amr.abdulhakim [anti-spam] gmail.com June 23, 2008
please , iwant the script to allow account password update ,, if the user changes the password i can change it within the script ,, please guys i seriously need it .. thanx alot
June 23, 2008
Account created successfuly. But i changed password in webpages but i want to change that password in cpanel email accont same time ?? is it posssible??
Tks for advance
bluedan21 [anti-spam] hotmail.com July 1, 2008
i have a problem wz anti spam, the imege dosent appers. what shall i do ?
ankaranakliyat [anti-spam] gmail.com July 11, 2008
very nice article.
http://www.estetik-merkezleri.com
Burhanuddin July 11, 2008
Hi guys i hav brought to u guys an amazing free web hoster which provides absolute free hosting.
It suports
ftp, mysql 5, php 5, cpanel, 350mb disk space, 100 gb bandwidth, mod_rewrite, GD, Curl and lots more

signup now-goto this link below

http://000webhost.com.com/58239.html

signup today and make a profesional looking website
Rafael Delmonte July 28, 2008
El script realmente funciona. El mismo me ha permitido resolver el problema que constituye la creación de nuevas cuentas de Email por parte de mis clientes.

Y es que para crear nuevas cuentas de Email antes yo tenía que darle el Usuario y la Contraseña de acceso al servidor a mis clientes... Ustedes saben los riesgos que se corren, sobre todo en los casos de servidores compartidos: Un cliente "curioso" al verse dentro del servidor puede dañar el sitio web completo.
Rafael Delmonte July 28, 2008
Al script le he hecho las siguientes modificaciones para adaptarlo a las necesidades de la gente de habla hispana:

1. Total traducción al español.
2. Rediseño total para hacerlo más atractivo.
3. Inclusión dentro del paquete de la fuente "Arial.ttf" para el funcionanmiento de CATCHA.
4. Un breve instructivo para la configuración del script.

Estoy dispuesto a compartir con todos el script modificado, pero necesito de autorización dado que el mismo, como usdedes saben, no es de mi autoría.

Para cualquier sugerencia en este sentido, esta es mi dirección:

buzon@graficartes.net
iwan ngonar saputra July 28, 2008
thanx for the script

it does really work on my cpanel using x3 theme.

tenkyiu.... beybeh....
July 30, 2008
yes i would like to see if this works for Plesk?
Cubix August 18, 2008
Works great! Love it. Thanks

www.CubixWS.co.uk
fiskilis [anti-spam] gmail.com September 4, 2008
why canot see captcha images ?? http://www.host-gr.eu/mail/cpemail.php
James September 9, 2008
Hi all. Great script. Im not that clued up on php, I can work my way around a little bit tho. This works fine but I would like it to direct to a new page if the account was created succesfully. How would i do this?

Thanks

James
James September 10, 2008
Hi all. Its ok. Sorted.

Thanks

James
koolvin1985 [anti-spam] yahoo.com September 12, 2008
can u help me and creat a c panel with my company name. i will pay what ever its gonna cost
aryol [anti-spam] aryol.com.tr September 23, 2008
nice page.thanks
http://www.aryol.com.tr prefabrik
October 24, 2008
nice solution!!!
is there a solution to check if email exist or not with answer yes or no?

Best regards VT
mangrw [anti-spam] yahoo.com October 25, 2008
i want free yahoo multi account creator plz help me thanks
darthmaul1289 [anti-spam] gmail.com November 3, 2008
how do u use it!!!
Gary November 5, 2008
Rather than give a "quota" for anything.. is there a way to specify which "package" should be used... eg:
cpemail.php?user=newuser&pass=password&package=myname_gold
kaytan November 8, 2008
thanks,
http://metaroa.com
pritis_dwibedi [anti-spam] yahoo.co.in November 21, 2008
thanks,
this script really worked, it helped me a lot.By the way can we create subdomain in the same way. please help me
fhsalez [anti-spam] hotmail.com December 6, 2008
Same here. Script is not working and nobody at Zubrag reall cares :(
Seems impossible to create an email account. It says it is created but no account gets created and you can, of course, try to create it over and over again. There should be some helpto get it working but not no, but .... no
henryhans59 [anti-spam] yahoo.com December 16, 2008
please i need a cpanel domain
xav.ice(anti-spam)gmail.com December 17, 2008
Modify the code "cPanel Email Account Creator" to create multiple mail accounts in a single click.

Those who wish to contact me xav.ice (AT) gmail.com
We sell just 20 U.S. dollars.
Woody December 21, 2008
This script is GREAT! Thank you very much!
For those of you who want to have a forwarder then all your customers need to do is set up their email account and then set it up to forward all their mail to whatever account.
For those who are wondering how the customer logs into their account, these are the easiest two options:
1 Make an iFrame page to the url of your webmail server. This option is best as it keeps all your own page design. Remember to test it 1st and make sure the width of your page is big enough for the webmail to be viewed correctly.
2 Make a link from any of your pages to the webmail url. This way only shows the webmail prog itself, none of your site's web design is shown so it looks a little naff and unprofessional.
December 23, 2008
The script is simple and it works, but it DEFINATELY poses a GREAT security threat. Since the cPanel login information is hard-coded into the script, ANYONE can get your cPanel login info and have COMPLETE control over your server. Not a good idea unless you are using the script for administration purposes.
info [anti-spam] stablephp.com January 12, 2009
If you are looking for one that your users can sign up at, change their own password, reset their lost pword, and you can administer and charge them via paypal....look here. no encrypted code, templated, and secure.

http://stablephp.com/Halycon+cPanel+Email+Automation
Spike [anti-spam] windowslive.com January 14, 2009
hey i have tried this and it works perfect, but i have one question, what if there is an existing user and he wants to change his email account password, like he has to login first to his email account first and then change his email account password, is that possible ?
etufan_cetin [anti-spam] yahoo.com February 4, 2009
Thank you. It's working
me [anti-spam] me [anti-spam] .com February 19, 2009
why dont you upload the script with all the mods included?
mtamim February 25, 2009
cool.. it's what i'm looking for
rucha March 3, 2009
Warning: fopen(http://.@:2082/frontend//mail/doaddpop.html?
[function.fopen]: failed to open stream: Success in cpanel email/panel/cpemail.php on line 82
Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode

Can someone help me solve this problem?explain in detail?
records2009 [anti-spam] ubbi.com March 29, 2009
Please how can i reach you? Your tel or email.
hardymendozaa [anti-spam] hotmail.com April 3, 2009
hola me parecio interesante el articulo pero sabes he descargado he cambiado todo lo subi a mi servidor y al momento que creo la nueva cuenta se crea con exito pero voy a ver a mi panel de control y no veo ningun correo creado con el nombre que puse porque?
gracias
reena.antony [anti-spam] g-antssoft.com April 8, 2009
Thanks for the solution, but i get some error like "Your php is running in Safe Mode" so fopen function can not be used. Is there any solution for this??
byesani [anti-spam] yahoo.com April 18, 2009
WWW.XLNCZ.COM
very nice
albert_einistein [anti-spam] yahoo.com April 19, 2009
Good! ;)
bindassweb [anti-spam] yahoo.in May 1, 2009
hi i want to ask you can i use it for provide emaail services from my web site to my visitors those need my email is it safe
asrarshaikh1(antispam}yahoo.com May 4, 2009
please can u tell me that is its safe to add link on my web site showing that create your own email under our domain nlike that is it safe to give in online please tell me

thanks in advance
vijay May 5, 2009
As per given script its run properly but in plesk it not show created email ids.
Is there any wrong in that script
emma May 14, 2009
how can i install this cpanel-create-email-account.php to send mail
saadmanna [anti-spam] uvce.ac.in May 14, 2009
Warning: fopen(http://...@sagar@65.60.42.250:2082/frontend/x/mail/doaddpop.html?email=test&domain=65.60.42.250&password=test&quota=250) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/uvceaci1/public_html/cpemail.php on line 78

Cannot create email account. Possible reasons: "fopen" function allowed on your server, PHP is running in SAFE mode
saadmanna [anti-spam] yahoo.com May 15, 2009
cPanel Email Account Creator can this work for justhost....???
Salman Siddiq June 8, 2009
captcha code not show did not work correctly help me
sakthi54086 [anti-spam] gmail.com June 24, 2009
Yes its working perfectly . but is there any possible to change the email accounts password from php? Is there any scripts available for changing password of panel email accounts using scripts ?
June 29, 2009
Really a cool solution.. I found some problem with finding out the theme.. But the url to find out theme which is available makes this work easier....
Thanks one and all..
Azmeen June 30, 2009
Thank you for this wonderful script.

You're a Godsend!
evana July 15, 2009
hi! i am trying to use this code but this error is coming."ERROR: FTP Account not created. Please make sure you passed correct parameters." Please help me out!!!
damian July 20, 2009
thanks for the great scripts
what is with all these people that either cant get it to work and want you to come and fix it for them or want you to write something else just because they need it?
vignes September 7, 2009
Dear friends,
signup page is displaying correctly and aftre signup success message is also showing. But the account is not created in my cpanel. Please help.
I turned off captcha img.
molotsi October 7, 2009
i am one of those who gets a message that email is created but nothing happens in the CPanel. Please help!
molotsi October 7, 2009
IT IS WORKING, THANK YOU THANK YOU THANK YOU... I used the wrong Cpanel username, thats why it didnt work first time.
FRANK October 22, 2009
is great but if i want to create the email account automatically also with a specified filter what shoould i do?
November 26, 2009
Hello, Pls how can i open the site for cpanel
dickrel3k [anti-spam] yahoo.com November 26, 2009
I need cpanel to used and how can you help me with
oliver_khoury [anti-spam] hotmail.com December 13, 2009
You've tried to sign in too many times with an incorrect e-mail address or password
oliverkhoury4 [anti-spam] hotmail.com December 16, 2009
You've tried to sign in too many times to this account. A temporary delay helps prevent people from trying to guess your password.

Asep Rohimat December 16, 2009
Hatur nuhun kang, hebat lah si akang mah.
Asep Rohimat December 23, 2009
Wooowwwww Keereennn Abizz, Great job, its work. THANK YOU THANK YOU.
one_two [anti-spam] 1378mail.com January 2, 2010
it is good
Chris January 13, 2010
It took me a moment because of all the subdomains I had. Also if you are trying this make sure that your php.ini allows url fopen.
Chris January 13, 2010
Thanks a million to the creator. I am playing with your tools right now. I must say they are a great set of tools
info [anti-spam] bwor.net February 7, 2010
This script is not working with cpanel 11
franglysebastin [anti-spam] gmail.com February 19, 2010
email account is created in my cpanel. then how to receive a mail from my site. here iam using php.
jatin8008 [anti-spam] gmail.com February 19, 2010
Thanks :) it works fine
February 21, 2010
I try, but this script not word with cpanel 11
ejovi.ejiro [anti-spam] yahoo.com March 7, 2010
please how can i get a c panel server name user name and password

Add Comment

!!! Comments posted here will not be answered. If you want to ask a question please post it on the forum.

E-mail or Name: Not required. Email will be protected from spammers

Comment: Please do not post unrelated comments

Anti-spam: Please enter (02fb4157) into the box