{
  "description": "A program which posts plain-text emails to Inkbunny as private messages.  Supports threading via an optional 'In-Reply-To' header.\n\nBe careful what automation you setup with this.  No one likes a spammer least of all the site admins you will piss off if you misuse this script.\n\nThe script is intended to be called from a mail client that can be configured to use a sendmail-compatible mail submission agent (MSA) but it can be run from the command line as so:\n\n[q]export PHPSESSID='my-session-id'\nib-sendmail -t <<EOF\nTo: JustLurking\nFrom: MyUserName\nIn-Reply-To: <55512345>\nSubject: This message was posted with ib-sendmail\n\nI'm a [i]ib-sendmail[/i] user.\n\nEOF[/q]\n\nThe script doesn't do any login of its own because I felt trying to automate the login process would not endear me to the site admins.  I trust that users who want to run this script will know how to extract the session cookie from their browser.\n\nThere is no official API for sending messages on inkbunny so this script may break in the future as the site is updated.  There's not much that can be done about that.\n\nNot all email messages can be sent via ib-sendmail.  Rather than trying to convert feature rich emails and guess at the user's intent the program simply refuses to post an email where there is any ambiguity.  The following conditions must be met for an email to be posted by ib-sendmail:\n\n1. Before any connection is made to the internet the message must have:\na. one text/plain section\nb. zero or more multipart/* sections\nc. one recipient (either as an argument or in a To: header if -t is given)\nd. zero Cc: or Bcc: headers\ne. one sender (either in a From: header or given as an argument to -f)\nf. Both must have only a local part with no @ in the addresses.\ng. If there is an In-Reply-To it must be numeric and singular.\nh. There must be a subject header containing non-whitespace characters\n\n2. Once a connection has been made to Inkbunny:\na. The sender must be the logged in user.\nb. The recipient must be the other user in the thread if an In-Reply-To header is set.\n\n[name]GreenReaper[/name], [name]Salmy[/name], [name]keito[/name], I believe these scripts fit in with the spirit of the other scripts found in the [url=https://wiki.inkbunny.net/wiki/Apps,_Scripts_and_Mods]Apps, Scripts and Mods[/url] page and don't violate the ToS, please remove them if you disagree.  I will be happy to make any modifications you require to these scripts if there is something in them that concerns you.\n\n[center][i]This program is uploaded in the hopes that it may be useful to others.  No guarantee is made that this program is correct and free from faults.  Never run code on your system that you haven't first read and understood.[/i][/center]"
}
