We all know how to open a mailbox using imap_open. Here the problem is i'm creating a maill system here. I'm not able to find to create a mail account with imap/pop3 in php. Is it is possible ?

Assume suppose my domain is www.studentmug.com. I want to create a mail for another user with out using cPanel. Ex:- radhakrishna@studentmug.com. I'm not finding any script for it. could any one got this problem ?

Thanks in advanse.

@ckchaudhary
That's great!! How do you do it for sub domain?

How do you do it for sub domain?

Looks like you just need to change $email_domain

I think that what to change is the line 21:
print $xmlapi->api1_query($account, "Email", "addpop", array($email_user, $email_password, $email_quota, $email_domain) );

But how...

@Crakken
my hosting provider does allows me to create email id's for sub domain, i.e: i can create info@demo.mydomain.com. So yea you just have to change $email_domain variables value and set it to your subdomain name.

@krishwebdesigne.
yes its fast.. creating email account is seamless with rest of your code execution, doesn't take much time and appears normal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.