date formatting logic moved into sql
adding the ability to pick and choose multiple emails from the body of the message, fixes #7173
switching to new civi popups, refs #7597,#7596