Bonjour,
J'ai essayé de configurer la fonction IMAP
L'accès semble fonctionner car pas d'erreur dans le fichier Log, j'ai juste une ligne qui me dit que la boîte mail est vide, alors qu'il y a bien un email dedans
J'ai fait une réponse à un ticket créé, en ajoutant 2 lignes vides à la fin de la réponse
Pouvez-vous m'aider, est-ce que quelqu'un l'utilise?
D'avance merci
M
PLEASE POST IN ENGLISH
___
Check the mailbox name.
Syntax is something like {server:port/imap/sll}INBOX
First part, between {} is the connection string (may be correct}, but if INBOX does not exist it is concidered as empty.
Hello Babynus,
Sorry for not having written it in English, but i saw some answers from you in French, that's why i did... 🙁
The INBOX mailbox exist, i tested it through a telnet on 143 with text command
But in the log file, i continue to have "mailbox is empty"
Thanks in advance
Please check status of messages.
If all messages are "seen", mailbox is considered empty.
(only "unseen" messages are treated, and then set to "seen")
Thanks for your quick reply,
The message stay on "unread" even if in the log it says that the mailbox is empty
One question: How the system will manage email that are not related to an existing ticket ? It will be placed as read?
PS: The mailbox i have setup is on an Exchange server, can it be a reason?
I tried to modify the connection string by deleting the /notls I have at the end, (in this case I have an error in the log). So I'm sure (99 %) that the connection on the mailbox is good when I have the log "mailbox is empty)
Thanks for your support
How the system will manage email that are not related to an existing ticket ? It will be placed as read?
All mails read are marked as read, even if not recognized as ProjeQtOr mail
The mailbox i have setup is on an Exchange server, can it be a reason?
I don't really thonk so.
I tried to modify the connection string by deleting the /notls I have at the end, (in this case I have an error in the log). So I'm sure (99 %) that the connection on the mailbox is good when I have the log "mailbox is empty)
For sure your connection string is correct, but this not assumes de mailbox name is correct : I think that with an Exchange server, it must fit the directpry name of the mailbox.
This is possibly the source of your issue : connection is OK to the account, but name of mailbox is incorrect, and may be language dependant (in french, it may be "Boîte de réception", and not "inbox")
Seems correct.
Are your emails in /INBOX or /INBOX/Test ?
Hello,
I tried to place them in both, but they arrive in th INBOX one
Could you try to change filter ot search mails.
In /model/CRON.php, line 482 :
$mailsIds = $mailbox->searchMailBox('UNSEEN UNDELETED');
Try to change filter to 'UNSEEN' or 'ALL'.
Important, to take changes into accound, be sure to stop and retart the CRON in the administration screen.
I tried with "UNSEEN", same story, in the log I have a line that mailbox is empty
I tried with 'ALL' last line in the log is that the cron has bee started, but no more line that the mailbox is empty 🙁
But nothing is updated in the ticket
I did the stop and start of the cron
I don't know how to interprete these results
Thanks for your help
M
So, next step is, with filter "ALL", to add some debugging lines.
First, set $debugLevel=3; in your parameters.php file
Then, add debugging lines. For instance, line 492 :
$body=$mail->textPlain; debugLog($body);
You'll then be able to see which messages are retrieved, and maybe understand why they are not correctly treated.
In $body there is nothing
but in $bodyHtml there is something...
In $body there is nothing
but in $bodyHtml there is something...
That's <hy your messages are not treated : only $body is parsed.
Does what is in $bodyHtml correspond to your message to be treated ?
Yes!
I tried to add $body =$bodyHtml, but did not succeed. 🙁
Seems that the HTML code is not clean like plain text
Yes, it's a bit more complex.
Here is just a try for a fix : unzip joint file (with folder) into /external.
Then make a small change in /model/Cron.php, from line 492, this way :
$body=$mail->textPlain;
$bodyHtml=$mail->textHtml;
if (! $body and $bodyHtml) {
include_once '../external/html2text/html2text.php';
$body=convert_html_to_text($bodyHtml);
}
Start / stop the Cron so that changes are taken into accound and try again.
First, I would like to thank you for your involvement!
I have another type of error now 🙁
2014-01-14 16:03:22 ===== TRACE ===== Cron started at 14/01/2014 16:03:22
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Namespace prefix o is not defined in Entity, line: 52
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Tag o:p invalid in Entity, line: 52
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Namespace prefix o is not defined in Entity, line: 53
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Tag o:p invalid in Entity, line: 53
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Namespace prefix o is not defined in Entity, line: 60
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Tag o:p invalid in Entity, line: 60
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Namespace prefix o is not defined in Entity, line: 63
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Tag o:p invalid in Entity, line: 63
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Namespace prefix o is not defined in Entity, line: 68
2014-01-14 16:03:23 ** ERROR ** ERROR **
2014-01-14 16:03:23 ** ERROR ** on file '/var/www/html/projectorria/external/html2text/html2text.php' at line (30)
2014-01-14 16:03:23 ** ERROR ** cause = DOMDocument::loadHTML(): Tag o:p invalid in Entity, line: 68
It seems your htmlBody is not a well formed HTML document.
Could you post (or send to me) an example of what you retrieve as $bodyHtml ?
