timmah1 Posted August 13, 2008 Share Posted August 13, 2008 I'm not sure if this is possible, but could anybody point me in the right direction? What I'm looking for is like a "Virtual" email system. When someone signs up for our site, they are given a "virtual" email from our domain. I need this virtual email to be put into the database with the users name and so forth. I need them to be able to send emails from the website, but also read emails that come to that "virtual" email. I already am able to send messages with this "virtual' email, but if someone replies to the email, how can I get it so that any messages to that particular email will be able to be read by the user from the website? Does that make sense? Any help would be greatly appreciated. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/119496-email-system/ Share on other sites More sharing options...
ignace Posted August 13, 2008 Share Posted August 13, 2008 you need a mail server so they can mail to user@your-doman.com, so when the user logs in you check for the mails for the user, you need a mail server, because you need to be able to create a unlimited amount of e-mail accounts Quote Link to comment https://forums.phpfreaks.com/topic/119496-email-system/#findComment-615602 Share on other sites More sharing options...
timmah1 Posted August 13, 2008 Author Share Posted August 13, 2008 I understand that. I have a email already set up as the default email address for the domain. So, any email that comes in to whatever@domain.co, will go to this email. But what I need is a script that will check this account, see what email address it is to, then put it in the database with the appropriate email address. Then, when the user clicks on "Inbox", the script searches the database for the "virtual" email address that is assigned to them, and then displays the message. I'm seeing that this can be done with sendmail piping, but I do not understand how to do this with sendmail piping. Quote Link to comment https://forums.phpfreaks.com/topic/119496-email-system/#findComment-615606 Share on other sites More sharing options...
JonnoTheDev Posted August 13, 2008 Share Posted August 13, 2008 From what your saying i'm guessing that you have a catchall mailbox for a domain name on your mail server and using mail forwarding to send messages from other domains (virtual as you call it) into it. Is this the case? Are you basically storing multiple users messages from your system in 1 email inbox and require a program to fish out just the email for a particluar user. If so this is one hell of job and a funny way of implementing such a system. To get php to login to a mailbox and read email is quite easy. You basically open a socket to the mail server and issue telnet commands. But to check if an email is for a particluar users email address requires opening each email and extracting the to address field. You could end up trawling through thousands of emails just to find 1 for a particular address. Why wouldnt these users have individual mailboxes to read their own email. You could do this easily with a WHM cPanel server. The API allows you to setup user accounts in the background. You would just give the user access to their webmail screen. Quote Link to comment https://forums.phpfreaks.com/topic/119496-email-system/#findComment-615661 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.