views:

30

answers:

1

Hi all,

For our friends-site I want to create a function where I, and my friends, can send an email to a special emailadres: [email protected]. I want to use the given subject as the blog-title and the mail-body to be the blog-entry. The timestamp the mail was sent must become the timestamp the blog is saved (at least this timestamp must be stored in the database) and only a specified set of mailaddress can be handled (so it's not a public service).

But I don't have a clue how to do this. Are things like this done by cronjobs and imap or something? I'm collecting thoughts on how to realize this. I'm not asking you to provide a fully working code but some suggestions on the requirements would be nice.

I hope to hear from you

Kind regards from Holland,

Ben Fransen

+1  A: 

A cronjob logs into the email address, downloads any mail, and posts it according to time stamp.

You will need:

  • Secret email address. Be sure it's secret because anything that gets sent will get posted
  • Blogging engine that you can either manipulate externally, have a decent idea of what the database schema looks like, or are willing to hack into.
  • Competent scripting skills

Cronjobs are particularly easy to setup. I was surprised myself at how simplistic it is. Decent tutorial.

Josh K
I'm quite new to cronjobs, actually I've only heard about them. Do you have a link to some sort of article or tutorial? I'm not really sure how to describe what I want to my google-try resulted in a Wordpress plugin, which I can't use because I have built my own blogsystem.
Ben Fransen
Adding a new comment to your update; thanks! Well, should the emailaddress be that secret? Because IF i manage to login to the mailbox I can check the sender-address and decide whether or not it should be placed. Adding stuff to the blog won't be a problem, it's a part of my CMS and I have the scheme and fully access.
Ben Fransen
@Ben: If it's not secret you will have the issue of your script checking the half million emails you have and cataloging them. Also I'm not sure about you, but sometimes I send stuff to myself. Sure don't want that posted on the blog. It's easiest with a separate email account where the mail can all be archived after it has been processed in the blog.
Josh K
@Josh K, thanks. I'm planning to use a specific emailadress for this purpose. Anyway, I've send my ISP a request to enable imap functions so I can start testing this :) Thanks for your answer. +1, accepted.
Ben Fransen