IMAP: Change email password through php

僤鯓⒐⒋嵵緔 提交于 2019-12-08 08:02:00

问题


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


回答1:


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!




回答2:


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).



来源:https://stackoverflow.com/questions/11150988/imap-change-email-password-through-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!