Skip to content

Instantly share code, notes, and snippets.

@xrd
Created September 14, 2010 07:59
Show Gist options
  • Save xrd/578690 to your computer and use it in GitHub Desktop.
Save xrd/578690 to your computer and use it in GitHub Desktop.
#!/bin/sh
encoded=`cat`
file=/home/example/`date "+%s"`.txt
echo $encoded > $file
# Use curl to send the data to our server
curl "http://example.com/mail/receive" --data-urlencode email_data@$file
# comment this out if you want to keep the file for debugging
unlink $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment