function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = FALSE)
    {
        if (!$cid) {
            $cid = md5(uniqid(time()));
        }

        $info['data']        = $data;
        $info['filename']    = $filename;
        $info['contenttype'] = $contenttype;
        $info['cid']         = $cid;

        $this->requestAttachments[] = $info;

        return $cid;
    }