The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

script to administer e-mail accounts

Discussion in 'E-mail Discussions' started by swiftanswer, Jun 24, 2002.

  1. swiftanswer

    swiftanswer Registered

    Joined:
    Jun 24, 2002
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am using WHM and Cpanel as a reseller on a shared server.

    I am trying to find a way to handle certain routeen email operations without having to log in to the cpanel (i.e. I want these to be site visitor initiated).

    Operations that I need are:
    Creating an e-mail account
    Changing an e-mail password
    Sending an e-mail password to the user (i.e. when lost)
    deleating an e-mail account

    if anyone can point me in the right direction I would apreciate it

    Jake Wagner -- www.JWmedia.net
     
  2. Shawn-commercepackage

    Joined:
    Feb 25, 2002
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Ditto

    I would be interested in the same.

    Shawn
     
  3. rweiss

    rweiss Well-Known Member
    PartnerNOC

    Joined:
    Aug 31, 2002
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Ditto #2

    I could also use all of these features, plus the ability to add e-mail forwards / autoresponders. I think this could be very useful, especially for importing users from a custom, home-grown system that I have. A Perl module, much like Accounting.pm, would probably be the best way to go.

    Anyone else interested in this sort of thing? DarkORB, any chance that this will be happening soon?
     
  4. Craig

    Craig Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    171
    Likes Received:
    0
    Trophy Points:
    16
    I would, submit a feature request to cpanel.net regarding this.. that way it would get looked at :)

    Craig.
     
  5. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    you could quite easily do all of this with a simple php script
     
  6. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    [quote:e1fa556238][i:e1fa556238]Originally posted by swiftanswer[/i:e1fa556238]

    I am using WHM and Cpanel as a reseller on a shared server.

    I am trying to find a way to handle certain routeen email operations without having to log in to the cpanel (i.e. I want these to be site visitor initiated).

    Operations that I need are:
    Creating an e-mail account
    Changing an e-mail password
    Sending an e-mail password to the user (i.e. when lost)
    deleating an e-mail account

    if anyone can point me in the right direction I would apreciate it

    Jake Wagner -- www.JWmedia.net[/quote:e1fa556238]

    Don't know about the other options you want out how can the email passwords be send to the user ? I mean they are not stored in clean text format on the server so they can just be mailed to the customer ??? Probably you can look for a third party plugin which can basically store all the details and mail it to the customers as when you want it.

    regards,

    Anand
     
  7. TCSLEA

    TCSLEA Active Member

    Joined:
    Oct 29, 2003
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, T E X A S
    The passwords are likely encrypted one-way, and therefore cannot be un-encrypted (and mailed to the user, for instance).

    However, here are some php lines that you may find useful:


    Adding an email account:

    PHP:
    fopen("http://$cpanelusername:$cpanelpassword@localhost:2082/frontend/$cpaneltheme/mail/doaddpop.html?email=$newusername&domain=$domain&password=$newpassword&quota=$quota""r")

    Deleting an email account:

    PHP:
    fopen("http://$cpanelusername:$cpanelpassword@localhost:2082/frontend/$cpaneltheme/mail/realdelpop.html?email=$username&domain=$domain""r")

    Changing a password:

    PHP:
    fopen("http://$cpanelusername:$cpanelpassword@localhost:2082/frontend/$cpaneltheme/mail/dopasswdpop.html?email=$username&domain=$domain&password=$newpassword""r")

    The cpanel user/pass/theme variables could be set at the top of the php script, and the other variables taken from an html <form>...
     
  8. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Not to mention how are they going to be able to get their new email password by email if they cant login to get it?
     
  9. Pache

    Pache Registered

    Joined:
    Mar 17, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1


    When I try running the fopen() it's getting me this error:

    Warning: fopen(http://...@localhost:2083/frontend/x2/mail/dopasswdpop.html?email=test&domain=test&password=test): failed to open stream: HTTP request failed! đ{@0C/¸ą˙żÔB0C/ in /home/test/public_html/test2.php on line 2
    Why? I've tried to change "http" to "https" and it works, but without any resoult.
    Do you have any ideas?
    Thank you!
     
Loading...

Share This Page