Giter VIP home page Giter VIP logo

Comments (5)

freescout-helpdesk avatar freescout-helpdesk commented on July 18, 2024

Here is the place to debug: https://github.com/freescout-helpdesk/freescout/blob/dist/app/Console/Commands/FetchEmails.php#L395

https://github.com/freescout-helpdesk/freescout/wiki/Debugging

from freescout.

anxodio avatar anxodio commented on July 18, 2024

Hi! I can add some more information :)

The point is that FreeScout, as we can see in the code, tries to get the $prev_message_id from the In-Reply-To header, and if this is not set, it goes to the get the fist not empty reference in the References header.

But some providers as SendGrid alter a little these headers. If I reply to an email using SendGrid, it adds an strange special new ID in the stack, for example:

References: <[email protected]>
 <171558990309.560360.10539124495512892944.tinycrm-236945@erp-ti>
In-Reply-To: <171558990309.560360.10539124495512892944.tinycrm-236945@erp-ti>
Message-ID: <th6C7XtDSaC0rz1nlrXICA@geopod-ismtpd-2>

Here, the message ID is added by SendGrid, the In-Reply-To is the original ID from the sender and the "real" In-Reply-To is the first reference.

This work with HelpScout, so I assume that them checks for the IDs of the mail in all the references to join the conversation, but FreeScout just try the "In-Reply-To" if it it's set (if I'm understanding correctly the code)

So maybe this issue is a little more complex?

from freescout.

freescout-helpdesk avatar freescout-helpdesk commented on July 18, 2024

You can send an email as EML file to [email protected] - we'll take a look.

from freescout.

freescout-helpdesk avatar freescout-helpdesk commented on July 18, 2024

Try with the attached /app/Console/Commands/FetchEmails.php file.

FetchEmails.zip

from freescout.

anxodio avatar anxodio commented on July 18, 2024

I tried it :)

This solution only works for the first reply, and it's dangerous: a lot of times the In-Reply-To ID is also on the references (not only in the SendGrid case), and it can generate unexpected behaviour.

So thinking about it and doing some testing, I think the best solution is to iterate all the possibilities of reply IDs and using the first we found in our freescout threads, following the order: In-Reply-To, References (by order), special FS marker. In most cases it will work as always (getting the In-Reply-To at the first attempt), but if not, it will try the other possibilites.

I will make a PR with the code that is working correctly now in our server, let's see if I don't miss anything and it works for you :)

from freescout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.