Does Sphinx ignore end/middle punctation for word/tokens? - sphinx

So if I index/search for 'Bob' and I have text like:
"and sent to Bob, Ted and Alice"
"last one was Bob"
"It was Bob!?"
"I sent it to Robert (Bob)"
Is Bob going to be found?

Related

I want to forward an Outlook email with all text after a particular string deleted

I am using Outlook 365. When I forward received emails, I want all text after a particular string ('regards' in the example below) to be deleted.
For example, I receive the following email which I want to forward:
From: Sender Gmail sender#gmail.com
Sent: Saturday, 18 February, 2023 02:58
To: Receiver receiver#gmail.com
Subject: DTP Query
Hello Receiver,
Hope you are doing well.
Please review the project and let me know the cost and turnaround time.
Best regards
ABC Enterprises
New Delhi, India
abc#gmail.com
I want the header removed:
From: Sender Gmail sender#gmail.com
Sent: Saturday, 18 February, 2023 02:58
To: Receiver receiver#gmail.com
Subject: DTP Query
I want to retain:
Hello Receiver,
Hope you are doing well.
Please review the project and let me know the cost and turnaround time.
Best regards
And all information after regards to be removed:
ABC Enterprises
New Delhi, India
abc#gmail.com
Is there a way to do this?
Dhiraj Aggarwal
New Delhi, India
I am not a technical guy, so didn't try anything.

How to reconstruct conversations or group emails?

I am having a PST files which contains the email history of a user. The task is to read this PST file and reconstruct the email history to display it in a client. This includes the correctly displaying of conversations as you know it from Email clients:
Meeting at 8:00 07:34 am
AW: Meeting at 8:00 09:12 am
AW: AW: Meeting at 8:00 13:45 pm
[Jenkins Build] Success 11:54 am
[Jenkins Build] Failed 12:13 pm
[Jenkins Build] Success 01:12 pm
[Jenkins Build] Success 10:34 am
[Jenkins Build] Failed 12:12 pm
[Jenkins Build] Success 05:12 pm
However, I don't know how I could do this reliably.
I am using java-libpst (see Official Documentation) which provides a PSTMessage object. There is a method getConversationId() but that appears to be just a string of the original subject of that message which means that there might be duplicates (e.g. [Jenkins Build]*).
So, I am not sure how Outlook is able to reconstruct conversations and whether this is trivial but if there is actually a simple method to do this which I am just overlooking I'd be happy if somebody would let me know - otherwise this will end up in me parsing a ton of subject fields, parsing them and trying to match emails by their subject with the danger of missing different conversations which just have the same subject coincidentally.
I think you will need to construct the conversations yourself. You might find the source code referenced on this page about the Netscape Mail message threading algorithm helpful.
I copied the source code to Github. Here's the email Threader.java file.
Here is someone offering an explanation of how Gmail constructs conversations My gist is:
Emails coming after an email with an equivalent subject, from any of the participants in any previous email, are part of the same conversation.
The in-reply-to email field can create participants to an email conversation even if they weren't an explicit participant.
Where:
equivalent subject means either an identical subject, or a subject that would result replying or forwarding. I.e. "FW: X", "RE: X", "Fwd: X", etc.
explicit participants in an email: the sender or any email appearing in a TO: or CC: field. (Maybe a BCC: field too...)
participants in an email: explicit participants in an email or anyone who has sent a later email using the in-reply-to field.
participants in any previous email: the distinct emails that are participants in email with an earlier send date having equivalent subject to a current email.
Here's another exposition of email fields relevant to email threading. What I took from this is that the References header should also be consulted in addition to the in-reply-to header, and that it is more reliable. (Maybe, if present, it should supercede the in-reply-to header.

Microsoft Graph API - find message by internetmessageid

I need to find conversationId for email exchange between two user - John and Harry.
In my scenario:
John sends message to Harry.
I have email metadata from email that John has sent, e.g. converstationId, internetMessageId, messageId (m$ graph user specific).
Now I would like to reply from Harry. Unfortunately the converstionId of Harry is different then John, so I can't use it. What I would like to do is to find email message object in Harry's inbox and use his conversationId.
With valid converstationId, I would be able to call replyAll on Harry behalf.
Can I make call like:
GET /me/messages?$filter=internetMessageId eq abcd
Yes, you can make a GET call in the form you suggest - have you tried it? The graph API supports standard ODATA query parameters.
On the graph API explorer, the following call works for me:
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600#THCIE7Dev2.onmicrosoft.com>'
This works
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<1430948481468.34600#THCIE7Dev2.onmicrosoft.com>'
BUT
One must URL encode the internetMessageId
Thus
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '%3C1430948481468.34600%40THCIE7Dev2.onmicrosoft.com%3E'

GMail breakpoints to hide/expand an email

Description of the issue
I am sending emails in JavaScript with
message2 = message.replace("<br>", "\n")
GmailApp.sendEmail(address, subject, message2, {
cc: cc,
name: sendername,
htmlBody: message
});
…where message is a long string containing HTML tags.
On my Gmail account the email that is received contains a … in the middle to hide/extend the end of the message. The … correspond to newlines (<br>) but it seems to chose a newline randomly that will be used to split the message randomly.
I cannot get rid of all <br> of course. I always saw these … to separate the main part of the email from the signature. But in my case it just appears anywhere as for example right after the first line:
Question
How does GMail choses the “breakpoints” for shortening the message?
How can I avoid that GMail uses “breakpoints?”
Should I use something else than <br> to make newlines?

Applescript delete mail by subject

Is there a way to delete mails by the subject, i'm trying to make an applescript that deletes mails with a certain subject from my 'Sent' mailbox. I have tried these scripts this with a test mail:
tell application "Mail"
set theMails to every message of (every mailbox whose name is "Sent") whose subject is "Test Mail"
delete theMails
end tell
and:
tell application "Mail"
set theMails to {every message of inbox "Sent" whose subject is "Test Mail"}
delete theMails
end tell
Both scripts didn't work, and I didn't understand the returned errors so I could not find a solution. Help appriciated!
the code bellow works. better to use word "contains" instead of trying exact match of the subject
tell application "Mail"
set theMails to {every message of sent mailbox whose subject contains "Test Mail"}
delete theMails
end tell