7

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 in IMAP section. could any one got this problem or solution ?

Please share your opinions & suggestions - Thanks in advance.

2 Answers2

1

You are on wrong way, you can not use IMAP or POP protocol commands to create a new user account. IMAP or POP protocols are used to access mails from existing mailbox on server.

Probably you should check whether any CLI command library is provided by your domain service provider or not. It it provides any CLI support than you can create a new email account with those commands (without using cPanel).

Note that you can create a new mailbox using imap_createmailbox, but can not add new user account.

Not a bug
  • 4,109
  • 1
  • 35
  • 68
0

Setup the imap server to authenticate using MySQL and create the accounts in a MySQL database using PHP. Dovecot is a decent email server for this.

Theodis Butler
  • 126
  • 1
  • 8