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.

add mail using php

Discussion in 'E-mail Discussions' started by noxtras, Jan 13, 2003.

  1. noxtras

    noxtras Registered

    Joined:
    Jan 11, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I found on this forum a php code that it should allow me to create mail accounts. It's not.
    After 2 days of hard work:) i found this problem.
    Everything works ok when CPanel creates the &inbox& file, but nothing works if i create the &inbox& file from FTP or from PHP.
    I tryed to chmod it and it now has 660, as it should be, i've tried everything but it does not work. I think it is something with file links Inods as i heard you call that.
    So.. the original Inbox files has 2 links ( one to itself and one to someone else, but who? !) and my inbox file has only one link to itself. How can i add another link to a file using php? and to whom should i link the inbox file??

    I hope there is at least someone out there who understands what i'm saying.

    Thank you,
    George
     
  2. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    I'd let Cpanel itself create the account and setup whatever is necessary (passwd, shadow and quota files...). I'd use /usr/local/cpanel/cpanel-email or make a call to the cpanel API through port 2082 or 2083.
     
  3. noxtras

    noxtras Registered

    Joined:
    Jan 11, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    thank you Juanra, but..

    Hello,
    I'd like to create email accounts from PHP. I want to be able to let website visitors ave a yahoo type free e-mail.


    Where can i find Cpanel API documentation?
     
  4. noxtras

    noxtras Registered

    Joined:
    Jan 11, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    thank you Juanra, but..

    Hello,
    I'd like to create email accounts from PHP. I want to be able to let website visitors ave a yahoo type free e-mail.


    Where can i find Cpanel API documentation?
     
  5. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    jimcarter posted a PHP script to do this some time ago:

    http://forums.cpanel.net/read.php?TID=3942&page=2

    It just opens the user's cpanel from inside the PHP script and then calls the page that adds the pop account with the correct parameters.

    Read the whole thread from there on for corrections and caveats.
     
Loading...

Share This Page