Quite a few people have reported issues with submitting solutions to the Facebook Puzzle Master. I hated the idea of installing and configuring a MUA to make things work, so I wrote a bash script. This should work on any Unix/Linux server with Postfix or Sendmail that is otherwise capable of sending Internet E-mail.
So far I have not been using any compiled languages. The script will have to be edited to be able to send compressed submissions with a Makefile etc.
The script should be in the same directory as your executable file and you should have a folder named “.archived-submissions” to hold your sent items, or edit the script accordingly. Then just call $ ./submit.sh <keyword> e.g. $ ./submit.sh meepmeep
You must edit line 2 (FROMADDRESS) to hold the address linked to your Facebook account (Google Mail, Yahoo!, university accounts, etc.) and line3 (SENDERADDRESS) to hold an address regularly used for sending on your server (to make sure you make it around any spam filters). Both lines may be set to the same address, but this didn’t seem to work in my case with Facebook linked to my Google Mail address.
BOUNDARY=_`date | md5sum | cut -d\ -f1`_
cat > $MSGFILENAME <<TFNAB-27-End-of-File
Date: `date -R`
Content-Type: text/plain; charset="iso-8859-1"
This text should be ignored by the robot
Content-Disposition: attachment; filename="$1"
/usr/sbin/sendmail -f $SENDERADDRESS $SUBMITTO < $MSGFILENAME
Note: it seems that using the address linked to your account is only of interest if you want to use the Facebook Puzzles App to post your successful submissions to your profile.