NYCPHP Meetup

NYPHP.org

[nycphp-talk] Online POP3 and SMTP account creation using PHP

Rolan Yang rolan at omnistep.com
Sat Jul 14 19:17:38 EDT 2007


Shadab Wadiwala wrote:
> Hello friends,
>
> I m working on a minor project using  PHP/MySQL in my college.
> I have been assigned a tough task to do.
> The project is a web-based email service on the lines of Yahoo Mail 
> and Gmail.
>
> Actually I need to create an online POP3 account and an SMTP account 
> of an end-user  in the email server using PHP.
> I don't have any experience in online POP3 and SMTP accounts  creation 
> and not aware with the PHP codes to perform the specific task.
>
> So if u know any thing regarding the above mentioned task so pls help me.
>
> Thank you
>
Dirty, inelegant, but does the job according to your specs above:

1) run sendmail or postfix, which is probably installed by default on 
your linux distro
2) run the pop3 daemon
3) install and run squirrelmail
3) adduser php script which does something like this:

<?php
// get $user and $password from $_REQUEST
// validate it
// check to make sure account doesn't exist
`sudo adduser -u $username -p $password -s /sbin/nologin`;
// show confirmation message that says your account has been created.
?>


This will probably get you a C- grade, but it works :)

~Rolan






More information about the talk mailing list