ansarka Posted February 26, 2007 Share Posted February 26, 2007 Hello friends I want to code a email server in which users can create there own email ids check email and send email . Actually my client want to provide email id to every user registered with our site Can any one plz help me :( Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/ Share on other sites More sharing options...
Ninjakreborn Posted February 26, 2007 Share Posted February 26, 2007 I think mail "servers" have to be done in powerful languages like C#, C++, Perl and other said languages. I know you can build an internal "messaging" system where people can message each other through the same system (I have done that). However sending actual emails to-from the address. You can send emails from it, just setup the mail script for each one, however the only problem is, there is no way "that I know of" someone can email you, and it appear within your database, of having recieved emial. I am not 100% sure about that? Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/#findComment-194361 Share on other sites More sharing options...
steelmanronald06 Posted February 26, 2007 Share Posted February 26, 2007 Actually, it can be done with PHP. You will first need to figure out how to allow PHP to send a message to apache to create the email, or you can do this manually for everyone that signs up. Then, store their email, along with password, in the database. Have them log in with their email address and password. When they send mail, just use the PHP mail() function, and on the $from, just use their login info to select their email from the database. As for displaying the email, you will need to make a small script for that. Not quite sure how, but you can look at most PHP Helpdesk. They normally include a file that is in PHP, or a cgi script. It shouldn't be to hard. Someone might be able to help more on this part. Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/#findComment-194407 Share on other sites More sharing options...
Ninjakreborn Posted February 26, 2007 Share Posted February 26, 2007 i didn't know that was possible, thanks for telling me that I can keep that in mind later if I ever need to create a mail server. I didn't know it was possible, I have a site I am going to build I will eventually want people to have there own email address, it's good to keep that in mind. Sorry for feeding you the wrong advice initially. Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/#findComment-194431 Share on other sites More sharing options...
Jocka Posted February 27, 2007 Share Posted February 27, 2007 The only way i can think of to make it work is like this (hate to give out the secret lol) Set up a MAIN 'bot' account that ALL messages will be sent to. Then assign the users their 'email address' which really doesn't exist but nobody has to know that. Example: thisguy@yoursite.com so then somebody emails thisguy@yoursite.com and it's transfered to mailbot@yoursite.com . you then have the PHP script check for who this is directed to, match it in the db, and save the message in the db according to the right person (blah blah blah). In theory, that would work. I have yet to try it but do plan to take that challenge on myself. Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/#findComment-194857 Share on other sites More sharing options...
trq Posted March 1, 2007 Share Posted March 1, 2007 thanks for telling me that I can keep that in mind later if I ever need to create a mail server This does not create a mail server, but utilises an existing server. A mail server could be written in php using the socket functions, just as you could also create a webserver with php. However, why would you ever need to? Quote Link to comment https://forums.phpfreaks.com/topic/40149-create-a-email-server/#findComment-196861 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.