I've read some articles and forums on the topic, but still hasn't gotten a clear answer for myself...

What I need is my incoming emails to be stored in my MySQL database.
I understand that the email has somehow be submitted to a PHP script that will handle it further, right?
But I have absolutely no experience dealing with emails and I know nothing about MTAs, PHP, etc.
I checked the hosting service, and from what I gathered, they provide POP. Is that good, bad, indifferent?
What should my actions be?
Please advise.

Thank you!

Hello levsha,
If your host support the PHP IMAP functions, you can use it to loop through emails in an email account and insert them in the database..

Hope this helped,
Chow,
T

Hello levsha,
If your host support the PHP IMAP functions, you can use it to loop through emails in an email account and insert them in the database..

Hope this helped,
Chow,
T

They do support PHP IMAP functions. How do I loop through emails?
And by the way, here's what I just got from my hosting's tech support:

we use shared hosting architecture and we do not allow to forward the email to PHP scripts.

After which the tech guy wrote me this:

Yes, you can try by using coding to grab emails and insert them into MySQL database.

This article explains the process: http://www.bucabay.com/web-development/incoming-mail-php-mime-mail-parser/

If you cannot setup your PHP script to handle incoming email, the other option is to pull mail from the mailbox when you need it. Such as with POP or IMAP etc.

You do not need these built into PHP, pure PHP can do it. There are numerous open source PHP libraries available for this also.

In the PHP website, under the documentation of the IMAP function, here, there a few nice examples on how to connect to your mailbox and loop through emails, with some modifications you can insert them in the database instead of displaying them..

Hope this helped,
T

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.