Deme Email integration plan

Update after discussion between Mike and Todd 6/6/2011, overrides 6/4 discussion

* No more Item.email_list_subject_prefix
* No more Subscription.email_includes_subject_prefix

Incoming email -> Comment
* comment.creator <- email.from
* comment.body <- email.body (plain-text component, verbatim)
* comment.item <- email.incoming_mailbox
* comment.name <- "Re: {comment.item.name}" collapsing multiple 'Re:' (if email.subject starts with 'Re:')
* comment.name <- email.subject (if email.subject does not start with 'Re:')

Comment -> Outgoing email
* email.from <- comment.creator
* email.to <- subscribers to comment
* email.replyto <- email.to (if subscribed_item.email_sets_reply_to_all_subscribers)
* email.replyto <- <blank> (if not subscribed_item.email_sets_reply_to_all_subscribers)
* email.body <- '{comment.name}\n{comment.body}\n{bottom info about email list}'
* email.subject <- '[{subscribed_item.email_list_address}@{domain}] {top_level_comment.name}' (prepend 'Re:' if this comment is not top-level)

Proposal after discussion with Mike, Noam, Jimmy, Chris, and Joe (updated by Todd, 6/4/2011)

Sending addresses for Agents

*When an agent posts a comment via the website, agent selects FromContactMethod from available EmailContactMethods. If none exist, default is a no-reply email address with a null field for FromContactMethod.

Subscribed item prefix option for Subscriptions

* Subscription has email_includes_subject_prefix field. If true, then subject lines of messages sent through a subscription will include a prefix showing the email list name of the subscribed item responsible for sending the message to the agent.

Email lists

* Folio will be the default way people create email lists / discussions. It unites message board and email list as concepts.
* Item has email_list_address field (advanced field) which, when prepended to @<domain> replaces the automatically assigned "To:" address for messages to the Folio
* Item has email_list_subject_prefix field (advanced field) which is used instead of the truncated item name as an email prefix, if specified.
* Item has email_sets_reply_to_all_subscribers field (advanced field). If true, reply goes to all subscribers, else just sender. Default all subscribers.
* A Group can have more than one Folio

Email header fields for email lists (sent through Folio subscriptions)

* From: <sending address>@<domain>
** NOTE: Bounce if comment is posted via email from an address that is not a valid EmailContactMethod for an agent with permission to make the comment

* Friendly name for To fieldTo: <email_list_address>@<domain>
* Email list address defaults to item-[itemid] or comment-[itemid] if not defined.

* Reply-to: <sender address> or <subscribers to Comment-<id>>@<domain>

* Subject: {[<email_list_subject_prefix or item name truncated>]} <comment title>
* Subject is based on the item we're subscribed to (user will get multiple subscription emails if they are subscribed via multiple subscriptions). Truncation limit settable in a DemeSetting.
** Email subject and comment names 1 repliesNOTE: Use same comment title on subject line for all posts in thread, even if user changes comment title for follow-up comments. Title of follow-up comments can be given at the start of the body of the email message when it differs from the initial comment title.

* NOTE on Reply-all: If Reply-to goes to subscribers to comment, then Deme posts to all addresses included in the To: field of the message from the user.

Keeping track of who sent the comment

* When someone posts a comment from email, it associates the email contact method with that comment (already works)
* When someone posts a comment from the website, it associates the FromContactMethod with that comment.

Longer term idea

* Each agent has a message box that unifies the subscribed to comments they have received together with personal messages.
* Subscription could specify an EmailContactMethod, message box, or both
* Message box would be organized so the user could separate comments by group, etc.

For Internet Explorer users: Click on the Tools menu, located at the top of your browser window. When the drop-down menu appears, select the option labeled Full Screen.

For Chrome users:Click on the Chrome "wrench" icon, located in the upper right hand corner of your browser window. When the drop-down menu appears, select the choice labeled Full Screen.

For Firefox user:Click on the View menu, located at the top of your browser window. When the drop-down menu appears, select the option labeled Full Screen.

For Safari users: Safari currently does not support the ability to go fullscreen.