View Full Version : email to php display emails on my site
flash
04-26-2008, 07:30 AM
can someone help me please.
i'm basically trying to catch the headers of an email text or picture attachments .
I have a friend that can text messages and pictures using the built in camera and email it to an address .
I want a build a blog that she could post text/+pics using her phone to the blog im creating (or maybe there's a prebuilt blog that can do that?)
basically when she email some address the php will somehow catch that and add all whats inside.
can someone help with that plz.
:o thanks
important to note that php is installed as a apache addon not cgi binary .
i guess i can change it if nessery.
thetestingsite
04-26-2008, 02:29 PM
Have a look through this thread. http://www.dynamicdrive.com/forums/showthread.php?t=27235
Unfortunately, the demo has been taken down since then (mostly because I am upgrading the code to add more features for a side project). The code is posted in the thread though, so you can try it out on your own server. Also, I believe that wordpress has this feature as an aftermarket mod that you can install (not 100% though).
Hope this helps.
flash
04-26-2008, 02:31 PM
ty , i'm looking through it.
flash
04-26-2008, 03:06 PM
i think it might be called postie for wordpress.
do u actually have a working script ready of this?
that you could upload somewhere please.
im just finding some unusuable things for me things with like perl, pear.
i want something simple if possible.
did the example u did was able to handle image attachments taken with the phone also ? so cool.
flash
04-26-2008, 04:19 PM
I tried the script you help do for davidjmorin , but i get no errors when i run it i mean i get nothing.
wish I could use my gmail address , but not insisting on it at all.
and to specific which specific email to check emails from.
flash
04-26-2008, 06:13 PM
wow cool postie for wordpress plugin worked.
but if i could get the script you made to work that would be even better.
im trying to build something more private and discrete.
and not use a built blog like wordpress.
thetestingsite
04-26-2008, 06:31 PM
ok, go ahead and send a test email to demo[at]thetestingsite.net and then go to http://thetestingsite.net/test/demo/
from there it will redirect you to the folder that the attachments are saved in. For the source, go to http://thetestingsite.net/test/demo/index.phps
Hope this helps.
flash
04-26-2008, 06:36 PM
wow that is so cool , thank you so much.
flash
04-27-2008, 07:58 AM
it would rock if there was a way it could of insert some info to the db .
say id,email address , date, pic filename.
would that be hard?
script works great.
thank you so much.
thetestingsite
04-27-2008, 02:00 PM
That was actually the modification I was working on. I should be finished with it later on tonight or tomorrow morning at the latest (when the time permits me to work on it). I'll post the updated code as soon as I'm done.
flash
04-27-2008, 02:02 PM
wow thank you so much u really rock , will wait :D:D:D
thetestingsite
04-27-2008, 02:34 PM
Ok, new update. The source code is at http://thetestingsite.net/test/demo/test.phps. You will need to make the database table with the following columns:
id, email, date, filename
Of course, you could change it, but you would also need to change the code in the php file. In any case, the config info is at the top of the file.
Hope this helps.
flash
04-27-2008, 02:37 PM
god that was so fast , i'll give it a try thank you SO much!
flash
04-27-2008, 02:42 PM
just two more questions please , is there a easy way i can restrict only for to recive and accept emails from a certian email address? (just one) no biggie i wont publish it anywhere should be ok if its difficult , maybe on the mail server options theres an option to forward all emailsl except from one.
and another question .
I should be able to do a cronjob of the script using a simple cron lynx command right?
thank you so much again!
thetestingsite
04-27-2008, 02:49 PM
For the first question, you would have to limit the account in the mail server. Not sure how you would do it, but I know it is possible. For the second question, yes you could use cron (or scheduled tasks on a windows machine) to run the file every so often. I would not recommend you set this time for less than every 10 minutes as it would become very server intensive.
Hope this helps.
flash
04-27-2008, 02:54 PM
yeah you're right .
i'm going to give the new script a try now.
I hope thats enough things in db to to keep going , should be enough.
:D
update : works perfectly:)
oh wow forgot one important thing , is there a way to add the subject and the content of the message to the db too? sorry! pushing it.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.