Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Hello,
I'm finalizing the evaluation of Projeqtor and start configuring our production server.
I've got a question concerning reply to mail and processing in Projeqtor.
When replying to a projeqtor mail (for this exemple a ticket description received), a note is being created in the notes but nothing is attached, so we cannot view the content of the email.
See attachement to check what I'm getting after 2 replies to original mail received from projeqtor. Each reply is seen (neq id notes 2 and 3 - by the way, why does the 1st reply be created as note #2 ?), so I can imagine imap is working correclty, but nothing else is visible from the note. I had to add html2text to external folder and now I don't receive any error elements in the logs.
Bonus question : is it possible to approve or refuse a ticket or any element received by email simply by replying to the mail ?
Thanks for your answers !
IMAP seems to be correctly configured. 😉
What was in the reply message ?
Please take care to add at least 2 blank lines between new message and original message.
Bonus question : is it possible to approve or refuse a ticket or any element received by email simply by replying to the mail ?
No. Reply ùessage is not analysed, just stored as note.
IMAP seems to be correctly configured. 😉
What was in the reply message ?
Please take care to add at least 2 blank lines between new message and original message.
Well I just put a simple phrase to test the system. I put 2 and 4 blank lines between new and orginal messages but the result is still the same.
Bonus question : is it possible to approve or refuse a ticket or any element received by email simply by replying to the mail ?
No. Reply message is not analysed, just stored as note.
Ok
Have to debug what's happening.
Please replace function checkEmails() in /model/Cron.php with this (including taces)
public static function checkEmails() {
self::init();
global $globalCronMode, $globalCatchErrors;
$globalCronMode=true;
$globalCatchErrors=true;
require_once("../model/ImapMailbox.php"); // Imap management Class
if (! ImapMailbox::checkImapEnabled()) {
traceLog("ERROR - Cron::checkEmails() - IMAP extension not enabled in your PHP config. Cannot connect to IMAP Mailbox.");
return;
}
// IMAP must be enabled in Google Mail Settings
$emailEmail=Parameter::getGlobalParameter('cronCheckEmailsUser');
$emailPassword=Parameter::getGlobalParameter('cronCheckEmailsPassword');
$emailAttachmentsDir=dirname(__FILE__) . '/../files/attach';
$emailHost=Parameter::getGlobalParameter('cronCheckEmailsHost'); // {imap.gmail.com:993/imap/ssl}INBOX';
if (! $emailHost) {
traceLog("IMAP connection string not defined");
return;
}
$mailbox = new ImapMailbox($emailHost, $emailEmail, $emailPassword, $emailAttachmentsDir, 'utf-8');
$mails = array();
// Get some mail
$mailsIds = $mailbox->searchMailBox('UNSEEN UNDELETED');
if(!$mailsIds) {
debugTraceLog('Mailbox is empty'); // Will be a debug level trace
return;
}
include_once '../external/html2text/html2text.php';
foreach ($mailsIds as $mailId) {
$mail = $mailbox->getMail($mailId);
$mailbox->markMailAsUnread($mailId);
$body=$mail->textPlain;
traceLog('body='.$body);
$bodyHtml=$mail->textHtml;
traceLog('bodyHtml='.$bodyHtml);
if (! $body and $bodyHtml) {
$body=str_replace(array("","
","
"), array("
Then Stop and Start Cron (important to take changes into account) and test email.
Post result (in log file) here.
Thanks
Hello,
I was not able yet to test the code. I will try soon and let you know.