Reputation: 256
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:- [email protected]
. 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.
Upvotes: 7
Views: 1497
Reputation: 146
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.
Upvotes: 0
Reputation: 4314
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.
Upvotes: 1