Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to implement an email to post system in php

Tags:

php

email

blogs

I would like to know how to setup a system in php that I could send emails to and the email content would poblish on my blog as a new post and the email subject would be the new post title.

Am not using word press or any of those blogging platforms am running my own blogging script and a php 5.x version.

I don't even know how to get started on this kind of programming challenge please any one with any ideas is welcomed.

Joe

like image 440
jcobhams Avatar asked Mar 08 '26 00:03

jcobhams


1 Answers

You would need to create a script that is able to read from your email account. Php has the IMAP library that enables you to read email messages. Check this link to see how you could use the library.

You would need to schedule the script to be run at a periodic interval of time (eg. every 5 minutes). In Linux you would setup a cron job to do it. So, I mean the script should be invoked periodically. If it finds a new message, it would then update your blog by taking the body of the email.

like image 92
Leonel Machava Avatar answered Mar 09 '26 13:03

Leonel Machava