Siva Charan
Siva Charan

Reputation: 105

how to receive and validate incoming mail for web based mails in php

We are developing a email web site.but we are facing problem in receiving and validating the mail.i have the following doubts.can you please help me in clarifying these??? one more important thing is we are not using squrrelmail, qmail etc.

  1. how do we receive emails for users in email web site?
  2. do we save all the received emails in admin's mail box or in database as per the username (my idea on email web site is,all the incoming mail are stored in admin's mail box and after the email mail is stored in database,and then the mail deleted in admin's mail box.Is it correct.if not how to store the emails in database directly in web site)
  3. what is the technique behind the receiving mail???i think there are various techniques like email piping etc.
  4. is there any special process of creating users for email web site,i mean do we need to create mailbox(i think mail account) for each user at the time of registration.if we need to create mail box for user,can we create it with imap_createmailbox() function.
  5. are the users gmail,yahoomail etc are accessig database or their mail accounts at the time their login??
  6. can we do all these things with imap functions in php??

Upvotes: 0

Views: 177

Answers (1)

Steve Smith
Steve Smith

Reputation: 5211

There are many different solutions to this problem, polling existing servers, adding scripts to run when a message is received or using a gateway like CloudMailin. I wrote a blog post relating to this (it's for rails but almost all applies to php too).

The other problems almost all span from how you setup the first thing. In many cases you could just log the emails directly to your database and retrive them based on the recipient address. I think you need to explain exactly what you want to do with the email? Are you just providing email hosting for your users or are you providing an additional service? If you're just providing hosting then there are simpler approaches available.

Upvotes: 1

Related Questions