-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save replies to existing ticket? #691
Comments
Hello @patriotaki, Each email has an unique I've shared my solution on Stackoverflow in the past. It also includes an example based on Laravel. You might want to check it out: https://stackoverflow.com/a/50768215/2966991 |
Hello @Sebi94nbg |
@patriotaki Usually, every email has a However, RFC 2822
So if an email has a I personally don't know any case, where this header is not set / available. In my cases it was always available / set. In worst case, your ticket system should be able to handle incoming emails without this header field. |
@Sebi94nbg hmm thats weird, emails that are sent from gmail do not have a message ID in my tests I am trying to find the correct logic of how ticket system should work. I guess that everytime that a ticket is created (either by form or by email) a unique message id must be generated by the software (me) that should be included in the reply-email (when a staff/admin replies). This way when the user replies through the email client ill be able to "detect" that its a reply to that specific email. So in conclusion all emails that are sent by the software (me) should have a unique message id generated by the software (me), even if the initial sender does not have a message id? Is my understanding correct? |
Are you sure? I've just sent an email from a Gmail business account to myself and it had a As written: The Message-IDs are the way to go. That's a RFC standard and usually also used by email clients for building the email threads/conversations. Also Gmail uses those therefore. Yes, your ticket system needs to set for each sending email the header field Additional, if its a reply to an existing email thread/conversation, you also need to set ALL Just as my |
@Sebi94nbg Yes, i've tried multiple times, message id is always empty, unless i am not using the correct code. code: |
Ah, using this library, ok. But in a mail client, you should see it. Can you find it in |
@Sebi94nbg Message id is still empty in headersRaw
|
See
If you don't even get this, then you probably have a different problem. How does your code look like? Did you also check the email headers in Gmail? There you should see a Message-ID. Click on "Show original" at the three dots on the right side within an open email. |
The message id is visible in the gmail when clicking show original `
|
Mhmm, looks good in general. I can't see anything, what could cause the issue. But I also can't see your full code, so the issue might be somewhere else. You're using Also checking the variables, if they are empty or not is not really necessary - the connection attempt would throw either a connection exception or authentication failure, which can be catched. If you really want to check them, you may also rather want to use something like When you add a Please also ensure, that you're using the latest version https://github.com/barbushin/php-imap/releases/tag/5.0.1 of this library and try it again. This also works with PHP 7.4, which you use. |
@Sebi94nbg this is the a partial result of headersRaw() , as far as I can see there is no message-id, I've tried other email clients but again no message-id. I haven't included the whole header because no where else the word message-id was present. |
@Sebi94nbg |
@Sebi94nbg sorry for bumping, just want to know if this is a "global" issue or is isolated to my code only? |
I‘ve also asked this myself. I need to test it. But due to christmas and my main work, I had no time to test it yet. Am 15.12.2022 um 09:43 schrieb patriotaki ***@***.***>:
@Sebi94nbg sorry for bumping, just want to know if this is a "global" issue or is isolated to my code only?
I haven't figured it out yet, messageID is always empty
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Great, let me know once you have more information.
|
Hi @Sebi94nbg , Happy new year! from what I can see I am not the only one with an empty message id in header response (see headers from issue #698) |
Environment (please complete the following information):
Your Text
Hello,
How can I map a reply with an existing email? I am trying to create a basic support ticketing system, lets say for example an email is sent to test@example.com, when the cron job executes a new ticket is being created in my web app and I reply through my system. If the user replies back through his email client, how can I detect it and add it as a reply and not as a new ticket?
The text was updated successfully, but these errors were encountered: