'(Obsolete) Send an email to an user via CannedScriptRunner.'

def email_user(self, user, body, title=u'JIRA    Notification'):

    url = (self._options[u'server'] + u'/secure/admin/groovy/CannedScriptRunner.jspa')
    payload = {u'cannedScript': u'com.onresolve.jira.groovy.canned.workflow.postfunctions.SendCustomEmail', u'cannedScriptArgs_FIELD_CONDITION': u'', u'cannedScriptArgs_FIELD_EMAIL_TEMPLATE': body, u'cannedScriptArgs_FIELD_EMAIL_SUBJECT_TEMPLATE': title, u'cannedScriptArgs_FIELD_EMAIL_FORMAT': u'TEXT', u'cannedScriptArgs_FIELD_TO_ADDRESSES': self.user(user).emailAddress, u'cannedScriptArgs_FIELD_TO_USER_FIELDS': u'', u'cannedScriptArgs_FIELD_INCLUDE_ATTACHMENTS': u'FIELD_INCLUDE_ATTACHMENTS_NONE', u'cannedScriptArgs_FIELD_FROM': u'', u'cannedScriptArgs_FIELD_PREVIEW_ISSUE': u'', u'cannedScript': u'com.onresolve.jira.groovy.canned.workflow.postfunctions.SendCustomEmail', u'id': u'', u'Preview': u'Preview'}
    r = self._session.post(url, headers=self._options[u'headers'], data=payload)
    with open((u'/tmp/jira_email_user_%s.html' % user), u'w') as f:
        f.write(r.text)
