Sample for creating tickets by reading a incoming emails in a mailbox

SVN:trunk[662]
This commit is contained in:
Denis Flaven
2010-08-05 12:33:34 +00:00
parent 9e618d466a
commit 9a70c6f82d

View File

@@ -141,7 +141,10 @@ for($index = 1; $index <= $iNbMessages; $index++)
$iPartIndex = 0;
$bFound = false;
$sTextBody = '';
if (count($oStructure->parts) == 0)
//echo "<pre>\n";
//print_r($oStructure);
//echo "</pre>\n";
if (!isset($oStructure->parts) || count($oStructure->parts) == 0)
{
$sTextBody = $oStructure->body;
}
@@ -178,7 +181,7 @@ for($index = 1; $index <= $iNbMessages; $index++)
}
}
$oTicket = CreateTicket($aSender['name'], $aSender['email'], $sSubject, $sBody);
$oTicket = CreateTicket($aSender['email'], $sSubject, $sTextBody);
if ($oTicket != null)
{
// Ticket created, delete the email