0

I want to find out if there is a way to read email information from a certain address with php, and take the From,To,Subject,Date and store them into a MySQL database. I would like to either check for new mails on a button click for example, or ideally when an email is received to get somehow the new mail and store the info i want.

I hope i have explained my question well..

Boopathi Rajan
  • 1,212
  • 15
  • 38
georgekar
  • 11
  • 2
  • Possible duplicate of http://stackoverflow.com/questions/965178/how-do-i-receive-email-and-process-it-in-a-web-application – Harshal Feb 26 '14 at 11:53

1 Answers1

0

it depends if the site is yours. if you are the owner of it or the coder it is possible to save it while sending simply by collection the info and saving it and only then send the email.

but if the email service itself is not yours (for example Gmail, Yahoo etc..) you cannot save the data with php. creating a program that reads emails could be possible, but i myself havent gone far enough to make a program that reads sites.

Dooodoo
  • 25
  • 8
  • Firstly, thanks for answering! I know how to save when i send the email, after all when i send an email i know all the info, so i can store them to a database. My problem is how to get the info if someone sends an email as a response for example. Yes, i am the owner of the site, and i want to add this functionality if possible. – georgekar Feb 26 '14 at 11:54
  • i cant see the problem here. if you can save the info, it doesnt matter who sends it because the function of sending an email is the same for all users, which means the saving of the info will happen everytime you send an email. – Dooodoo Feb 26 '14 at 11:59
  • My difficulty is not when sending an email, but when receiving an email at this address. I want to store the info from the incoming emails, not from the ones i send. – georgekar Feb 26 '14 at 12:03
  • if you want to do this with php, you need to be the email service provider. – Dooodoo Feb 26 '14 at 12:07