Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Intecepting E-mail with PHP

Intecepting E-mail with PHP
Thread Tools
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
May 29, 2003, 05:20 PM
 
Hello everyone,

A client has recently inquired if it is possible to do the following: Send an e-mail to a webserver, that will intercept it, read the contents (ie. subject, body) and then post those contents to a file or database, all via PHP.

Is this at all feasible?

Please let me know, or if you have any other suggestions. The reason for this method is because almost everyone can use their e-mail client, so this would be the easiest possible way for a user to submit information.

Thanks,
Jon Marus
www.jmarus.com - kicks by JM
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
May 29, 2003, 07:07 PM
 
short answer: sortof

if you have an email box php can access it via imap or pop... and post it. What I don't belive php can do is to be the mail server itself. you should be able to find free (open source) email servers on sf.net, but most servers should already have them.

I'm not aware of any scripts that do exactly what you want, however take a look at a simple webmail script, which will contain code for taking the mail from the server. you can combine that with some simple commands to mysql, so that instead of displaying the email it will put it into mysql.

if you decide to do that you need to make sure that your mailserver can execute the script whenever a new message is sent.

so in conclusion it is not feasable to do it entirely in php (need a mailserver) but it can be done

--will
     
Dedicated MacNNer
Join Date: Dec 1999
Location: Canton, OH
Status: Offline
Reply With Quote
May 31, 2003, 02:33 PM
 
Originally posted by jon31:
Hello everyone,

A client has recently inquired if it is possible to do the following: Send an e-mail to a webserver, that will intercept it, read the contents (ie. subject, body) and then post those contents to a file or database, all via PHP.

Is this at all feasible?

Please let me know, or if you have any other suggestions. The reason for this method is because almost everyone can use their e-mail client, so this would be the easiest possible way for a user to submit information.

Thanks,
Jon Marus
Yes you can!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2