How can I change password of the mail account using php. I am using IMAP functions.
IMAP doc : http://php.net/manual/en/book.imap.php
Note: There is no acess to cpanel API
How can I change password of the mail account using php. I am using IMAP functions.
IMAP doc : http://php.net/manual/en/book.imap.php
Note: There is no acess to cpanel API
What you could try is mailpw_change. It is not really PHP, but a simple HTML UI with a Python script that is called underneath (which you could adapt to your needs as it's super-simple).
If you don't have access to the cPanel API, then you're even less likely to have root access to the various files that would be needed to make the changes.
Changing passwords is not a feature of IMAP, POP or SMTP - it's a server configuration issue, so you need to manipulate the server configuration. Several hosts provide APIs (such as cPanel / Hostgator) but you've ruled that out, so he only other option would be "exec", and I wouldn't touch that with a bargepole for cPanel, Plesk or simlar as you'd also need ot manuliplate the databases that store the configs. Ouch, if if you had root access.
Edit: A bit more reasearch and I have found this: http://trac.roundcube.net/browser/github/plugins/password/password.php that supports several back ends. However the cPanel option uses the cPanel API; so still no luck!