Parse a new message

POST /rest/parser/parse.json

Import a raw message source.

Example


$mime = <<< EOF
From: jeff@localhost
To: support@localhost
Subject: This is a test through the Web-API.
Message-Id: <abc2@local1234>
X-Mailer: cURL+PHP5

This is some message content.
EOF;

$postfields = array(
    array('message', $mime),
);
$out = $cerb->post($base_url . 'parser/parse.json', $postfields);

Parse a reply

POST /rest/parser/parse.json

Parsing a reply to an existing message is fairly simple. You should use the quoted Message-Id: header as an In-Reply-To: when possible, but you can also use a ticket mask in the subject as a fallback option.

Example


$mime = <<< EOF
From: ben@localhost
To: support@localhost
Subject: [parser #TKD-88128-525] This is a test through the Web-API.
Message-Id: <abc1@local1234>
X-Mailer: cURL+PHP5

This is another reply using the subject masks.
EOF;

$postfields = array(
    array('message', $mime),
);
$out = $cerb->post($base_url . 'parser/parse.json', $postfields);