Welcome Guest, Not a member yet? Register   Sign In
Handle incoming emails
#1

[eluser]zeedy2k[/eluser]
Is there a way for CI to handle incoming emails? For example Im creating my website and part of my client area is here they can email regarding their project... anyone know if I can pipe this to CI to insert into the database?

Cheers
Robert
#2

[eluser]Pascal Kriete[/eluser]
If they're sending the e-mail from any old account, then no. You would need your own MTA for a start, this would be quite an undertaking.

You could make a standard contact form where they leave their e-mail address and a message.
#3

[eluser]zeedy2k[/eluser]
they would be sending from the email on their account and the subject would also contain the project ID... I dont know about incoming emails but I thought it would read the email address, grab the project ID and post the contents into the database for the particular project but would cross match the project with the email to ensure noone can just email regarding any project.

Hope this makes sense.
#4

[eluser]Pascal Kriete[/eluser]
Yup, that makes perfect sense. Sadly, unlike sending mail, this isn't as easy.

You'll need a local mta such as qmail.

I've never done anything like this, but it must save the incoming mail somewhere. If it's saved in any kind of comprehensible format you could have a update_mail() type of function in your admin area. That would then check the directory with the new messages and add them to your database (or make a cron job do it).
#5

[eluser]ejangi[/eluser]
Yeah, you could (like inparo said) have a something (cron) check the POP account every once in a while and pipe all of the mail to a database.
#6

[eluser]bapobap[/eluser]
Could you setup an email forwarder to pipe the email to a PHP script, then use
Code:
fopen("php://stdin", "r");
to read the input?

You may be able to get it to work with CI or just write a plain old php script?
#7

[eluser]Pascal Kriete[/eluser]
Check out this page. It's a little dated, but the basic concepts still apply.
#8

[eluser]CI jforth[/eluser]
http://www.nameko.org/
I used this for the same idea. check it out

but I plan on using zend_mail for another project.
http://framework.zend.com/manual/en/zend.mail.read.html
#9

[eluser]Unknown[/eluser]
Here are 3 services that can help you do it:

1. Email2PHP

2. Email2HTTP

3. Mailhook ( still around? )




Theme © iAndrew 2016 - Forum software by © MyBB