How to thread emails using custom headers? - c#

Does gmail preserve x-headers in email replies?
I'm developing an application which threads emails and email replies together using a Thread Id.
I add the header through SMTP .net library with the thread id, using the key X-ThreadId.
If I send it to a gmail account, I can see the header in there in the email source. However if I then reply to it, I want that header to be sent in the reply. It seems to drop that particular header.
Does gmail drop header information in the reply email? Is this a generic problem with email? If so, how do I get round this problem?

I can confirm that Gmail does not add X- headers to the new email when you hit reply button.

Related

How to disable auto-reply from users email when mailing via Bot

I have bot for mailing some info to my subscribers via info#domain.com. After sending all mailing, from users comes auto-replied letter like "they got mail, and will answer soon"~something like this.
Question is: How to stop or disable that auto-replied letter from users?
P.S: my mail box filled with auto-replied letters((
I want to get letter when the users himself sends.
P.S: before I used sendgrid service to mailing, so while using sendgrid I never got auto-replied mails. Now it's expensive for me((, so I decided to use just yandex.com service.

Docusign RestAPI - Send Notification to another email

I am using DocuSign API and sending documents to a candidate for signing. As an admin of the DocuSign account, I get a notification email when the candidate viewed/signed or declined the document. Now all I want is to send this admin notification email to another email via API.
Any idea?
PS: I have to trigger the notification email while sending the documents to the candidate.
Viewed/Signed notifications are always sent to the sender of the envelope via DocuSign (out-of-the-box), and you cannot use API or any other DS settings to re-direct these email notifications to someone else who is not in the workflow. Instead you can opt for one the below two options:
a. Add that person's email address first in the routing order as Carbon Copy recipient, once that person is in routing order then he/she has access to the envelope's history, and can always open the envelope and check the envelope history to know who viewed or signed the envelope. But in this case also this person will not receive any viewed/signed envelope email notifications,but he/she can receive any declined/voided email notification.
b. Use DocuSign Connect which is based on publish/subscribe type architecture. Per below screenshot, you can subscribed for interested trigger events, once those events happen then DocuSign will push an XML message to your listener, and once you receive these XML messages then you can use any other email APIs like Gmail etc, to send email notification to anyone interested in receiving such notifications.
Those notifications go to the owner of the envelope, so if you're okay with losing them yourself you can set up a Transfer Rule so that the alternate email address holds the envelope and gets the Sender Notifications.
Documentation on Custody Transfer Rules is available here: https://support.docusign.com/en/guides/ndse-admin-guide-custody-transfer

linking a received email with a sent email

I have just completed reading received and sent emails using c# console application well that was easy part now the problem is I wanted to know is there a way of linking a received email to its replied/sent email like lets say i create a streamwriter and I write the contents that I need from the received email and the contents from the replied/sent email. How would I then go about knowing the received email to its replied/sent email? How would I link them? Uniquely differentiate from the tons of email?

Reading Unique mails using gmail API

I am reading mails using Gmail API, where I could successfully download the mails to my system. The idea is to navigate through all the label and download the mails, but that is resulting in duplicate mail downloading, as a single mail can belong to different label.
I tried looking up for label $All to get unique mails but i guess All Mail Label is not supported in latest Gmail API. Is there a way to read unique mails in gmail?
Synchronizing the mailbox can be done using Gmail Synchronization guide:
https://developers.google.com/gmail/api/guides/sync
Use history.list() method of Gmail API with Label ID filter and check for 'messagesAdded' section for Message IDs. You will not get the message body, only IDs, and subsequently have to call message.get() with received Message IDs to get message body.
If a message has multiple labels, history.list() will give you messages directly received in a particular label, hence you will not get the same message twice if you call history.list() with different label IDs.
You can also avoid duplicate messages by handling them in your application by storing each message ID in a cache store such as memcache or an in-memory hash table to avoid processing duplicate messages.

Remove Duplicate of bulk email received from different user

i have five user using outlook email client. Each of them receiving mails from a email marketing. i need to get all the unique mails from all my five user. i used the following,
Message-ID of outlook email header.
if a same mail received to same user, then Message-ID is same. so that i can able to eliminate the duplicate mails.
if a same mail received to different user, then Message-ID is not same. so that i can able to eliminate the duplicate mails.
is there any better way to eliminate the duplicate mail from different user
As far as I know the message ID is exactly what you cannot use. It is always different. Check the properties of the emails and find similarities and check these. The first is going to be the From then Subject then maybe a part of the body.

Categories