PonyConf/conversations/post-mail.sh
2016-07-08 01:07:55 +02:00

10 lines
284 B
Bash
Executable File

#! /bin/bash
# Usage: cat email.txt | post-mail.sh https://example.org/conversations/recv/ /etc/ponyconf/key.txt
# The file /etc/ponyconf/key.txt should contain the value of the django setting REPLY_KEY.
url="$1"
key="$2"
curl ${url} -F 'key=<${key}' -F 'file=@-;filename="email"'