Skip to content
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

How to show original sent date #55

Closed
GiacomoDD opened this issue Aug 14, 2022 · 4 comments
Closed

How to show original sent date #55

GiacomoDD opened this issue Aug 14, 2022 · 4 comments

Comments

@GiacomoDD
Copy link

Hi, importing mbox files, the Gmail message is not showing the original sent date, but importing one. Is there a way to fix this issue? I read this old post on StackOverflow, but I don't know if it is still possibile to implement that solution..
Thanks

@eesheesh
Copy link
Collaborator

Hi,

As you can see in line 267, the script uses dateHeader as the internal date source. That means that the "received date" you'll see in Gmail is the date in the message's Date header.

Gmail API doesn't provide a way to specify a separate "received date", it can either be the date when the message was imported, or parsed from the Date header.

Even if using the dateHeader option, you might still see the import date as the message's "received date", if Gmail failed to parse the Date header during the import. Please check the message you're importing and see if the date is formatted correctly as per RFC822.

@GiacomoDD
Copy link
Author

Ah, thank you so much for your suggestion. Actually I'm not a developer, so I'm trying to figure out how to do this formatting check, but it's a little bit hard and cofusing..

@eesheesh
Copy link
Collaborator

If you have an mbox file, it's just a text file, that you should be able to open with any text editor. Then, look for the affected message (i.e. a message where you saw the wrong date in Gmail), and take a look at the line starting with Date: at the top of that message.

You'd often see that there's no such line at all, or it's there but formatted incorrectly (for example, date as "16/8/2022" instead of "16 Aug 2022").

@GiacomoDD
Copy link
Author

Thank you @eesheesh for your precious help. Yesterday I finally was able to make everything work, importing all the mbox files into the Gmail accounts. I'm not sure what happened, because I didn't modify anyone of the mbox files. But in the end it worked.
Thanks again for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants