Skip to main content Help Control Panel

 

English «   Post your requirements here «  

Is there a way to post content by email?

Dubsky, Eoin -- on Sep. 3 2004
Student from Ireland... Living in France.

Hi again, I'd like to try 'moblogging' with YACS -- sending a short message with a photo from a camera mobile phone by email to my site. I was wondering whether anyone has done this yet with YACS, and if so, could you explain how its done? ::)

Thanks, Eoin

Bernard Paquesfrom nearby-an-airport
Associate, 8405 posts

on Sep. 3 2004


Eoin,

I definitely have to add this function because we need it on our intranet for my job, not the moblog, but the blog by e-mail

Work to achieve this is planned but still not started. At the moment I have only started to look at other scripts to select among several options.

The design is quite simple:
  • messages have to be put into a mailbox readable through POP3 or IMAP4 protocols
  • in the background, a script scans the mailbox, enqueues received messages and process each of them
  • message headers are checked to avoid spamming
  • message body is decoded depending of MIME type and its content is either stored in the database if it is an article, or saved as a file if this is an image
  • if the message contains only one image, YACS will have to create an empty article around it


Actually general mechanisms are similar to what has been put in place for ftp blogging. See agents/uploads.php to get an idea.
Dubsky, Eoin
23 posts

on Sep. 4 2004


Hi Bernard, If you've already got a file which parses content in a given directory, why not setup the blog-by-email script like this then:
  • Use ProcMail or your .forward file, or "mail forwarders" in CPANEL, to pipe emails to a particular address to a PHP script. e.g. moblog@yacs.com -- "|/path/to/moblog/parser.php"
  • The parser script could be similar to the FTP blog parser you already have.
  • See Similar script for TextPattern.


The other method (the one you described) is safer, in that you can keep a backup of your email blogs in your inbox just in case something happens to your website. The method above however doesn't require a cron job and will get to work the moment an email is received.

Bernard Paquesfrom nearby-an-airport
Associate, 8405 posts

on Sep. 4 2004


You are right, mail forwarding is the optimized solution, since messages are processed as soon they arrive at target host.

But unfortunately the approach you describe only apply to Unix boxes, and would like to support other operating systems as well, including Windows and Mac.

This is why we should do it with PHP-only and a cron-like approach.

You said somewhere that you have played with WordPress, which seems to be a very powerful blogging tool. Therefore I have downloaded the wp package and will look at their blogging-by-email script. I will review Drupal and blog:cms as well.

At the same time I will have to review RFC to ensure we are implementing standards correctly.

Guess at least one or two weeks of work would be necessary to complete this. Cheers...

Bernard Paquesfrom nearby-an-airport
Associate, 8405 posts

on Sep. 9 2004


Eoin, please take a look at This page has been posted by e-mail!. At work I have already send, in one single message, a new page, plus one image and one attached file. I will do the same test on this server as well tomorrow morning.

" I'd like to try "moblogging" with YACS "


Would you like to test the sending of a MMS message to an upgraded YACS server? Thank you for your feed-back. If you want to perform some tests against this site, please contact me.