Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
jtso Offline
New Member
 
Posts: 1
Join Date: Aug 2006
Tickets are not being creating when submit through email - 08-08-2006, 11:46 PM

New tickets are not being created when being sent through email. Mail is being received by esupport and being pulled from IMAP.

Getting mail parser errors stating

Cannot create ticket, 'From' is empty (08 Aug 2006 05:39 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 05:32 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 05:01 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:58 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:56 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:52 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:49 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:39 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:34 PM)

Cannot create ticket, 'From' is empty (08 Aug 2006 04:21 PM)


I think my pop3function.php is incorrect. Some please verify.



<?php
//###########################
// eSupport - By Kayako Web Solutions
//
// Copyright (c) 2001-2003 Kayako Web Solutions
// Unauthorized reproduction is not allowed
//==============================
// www.kayako.com
//###########################
if (!function_exists("v")) {
function v($str) {
return $GLOBALS[$str];
}
}


// Enable/Disable debug reports
$debug = "off";
$debugemail = "j";


//#################################################
//# DO NOT CHANGE ANYTHING BELOW THIS POINT
//#################################################

$msgcount = array();
// REQUIRED FILES
require_once v("subd") . "functions.php";
require_once v("subd") . "error.php";
require_once v("subd") . "smarty/Smarty.class.php";
require_once v("subd") . "config.php";
require_once v("subd") . "database/db_core.php";
require_once v("subd") . "functions.php";
require_once v("subd") . "template/template.php";
require_once v("subd") . "registry/registryclass.php";
require_once v("subd") . "registry/settingsclass.php";
require_once v("subd") . 'decodeMail.php';
require_once v("subd") . "htmlMimeMail.php";
require_once v("subd") . "ticketcore.php";

$debuginfo .= "Declaring classes\n";
$ticketcore = new TicketCore;
$dbCore = new dbCore;
$registry = new Registry;
$template = new Smarty;
$templatedata = new TemplateData;
$settings = new Settings;
$mail = new htmlMimeMail();
//====================
// Update charset information
//====================
$mail->build_params['html_encoding'] = $html_encoding;
$mail->build_params['text_encoding'] = $text_encoding;
$mail->build_params['html_charset'] = $html_charset;
$mail->build_params['text_charset'] = $text_charset;
$mail->build_params['head_charset'] = $head_charset;
//====================

if ($imapsizelimit == "") {
$imapsizelimit = 2;
}

$dbCore->query("select * from asEmailHandler where method = 'imap' order by id asc");
while ($dbCore->next_record()) {
$department = $dbCore->Record["department"];
$depid = $dbCore->Record["depid"];
$mbox = imap_open("{". $dbCore->Record["host"] ."/imap/notls}INBOX", $dbCore->Record["username"], $dbCore->Record["pass"]);
if ($mbox) {
$rejected = 0;
$accepted = 0;
$totalmsg = imap_num_msg($mbox);
for ($i=1;$i<=$totalmsg;$i++) {
$structd = imap_fetchstructure($mbox, $i, FT_UID);
$db = $structd->bytes;
$kb = $db/1024;
$mb = $kb/1024;
if ($mb > $imapsizelimit) {
// reject message and add to parser log.
$rejected++;
parserlog(2,"Message Rejected by Parser as Mail Size Limit Reached (MSGID: $i)", "No Data was Fetched");
} else {
$accepted++;
$GLOBALS['decodeMail_output'] = new stdClass;
$GLOBALS['decodeMail_inRelated'] = false;
$ticketcore = new TicketCore;
$headers11 = imap_fetchheader($mbox, $i, FT_UID);
$headers = explode("\n",str_replace("\r\n","\n",$headers11));
$message11 = imap_body($mbox, $i, FT_UID);
$mess22 = explode("\n",str_replace("\r\n","\n",$message11));
if (count($mess22) == 0) {
$mess22[] = $message11;
}
$fetchtype = "imap";
$data = str_replace("\r\n","\n",$headers11.$message11);
$ticketcore->processBody($headers, $mess22, $depid,$department, $headers11, $message11, str_replace("\r\n","\n",$headers11.$message11));
imap_delete($mbox, $i);
}
}
imap_expunge($mbox);
imap_close($mbox);
}
}
echo "$totalmsg Total Messages<br>Rejected Messages: $rejected<br>Accepted Messages: $accepted";

if ($debug == "on") {
mail($debugemail, "Debug Info Request: ".date("d M Y h:i:s",time()), $debuginfo);
}
?>
   
Reply With Quote
Reply

Tags
submit, tickets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Creating Tables Danym SupportSuite, eSupport and LiveResponse 1 03-11-2006 11:22 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47