![]() I just extract the img-tags, get the URLs, and remove all the img-tags in the mail with my favourite XML Parser.Īfter the tags are removed, I just insert the URLs in the mail where I see fit, and encode it back to the URL safe base64-encoded data it was retrieved in. Replace all the "-" with "+", and "_" with "/" to transform it from URL safe base64 data to regular base64-encoded data. Let's do the aforementioned base64-decoding. I get it raw, decode its URL safe base64-encoded content, and have a look. Probably not an issue if the script is just for you. You could also subscribe to push events to mitigate the risk of your user pressing the message before you poll and alter the messages, as mentioned by in the comments. I only ask for Ids of the potential new messages. I'm careful to use the after-parameter in my query with the value of the last time I checked my Inbox, as seconds since the epoch. Let's say I'm polling my Inbox every minute for new messages, with the ()-request. ![]() I think the Gmail API would suit your needs perfectly. tl drįor my Gmail account, how can I programmatically modify (and save changes to) received emails? At the time, you couldn't do that, but it seems possible that these have been updated since then or that there are solutions using the Gmail API or IMAP. #2017 gmail autopurge script how to#I found a couple of threads from 2010 on how to modify the subject line using Google Apps Script and Gmail itself. Editing emails is something that I've done with the MS Exchange Server APIs, and I'm looking for a way to do this with Gmail - by whatever means available. That way, no matter what app I use to open the email, I'm in control of how/when I'm tracked. My current thought is to write a back-end script that can run on new mail (received either from an event or frequent polling) to turn embedded HTML images into hyperlinks links to those images - only used if I really need the image. For example, apparently there isn't a way to do this with Google Inbox. ![]() In the Gmail app specifically, I can turn off auto-loading of images, but I'd like to have similar protection for other apps that don't have this setting. I'm aware that Google uses a proxy to load the images so at least they won't reveal my IP address, but there are certain individuals and organizations that annoyingly embed trackers into their emails - and they actively check whether or not I read their emails. Ultimately my objective is to prevent email tracking via auto-loaded images with unique links. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |