How to import an email while it is open in the web interface of email provider

I know how to import an email while reading the email in Mail.app. However, recently I have switched from reading and processing email in Mail.app to doing it using Fastmail’s web interface. When I am reading an email, the browser address points to an email specific URL.

I would like to be able to import the email into DEVONthink - either as a .eml file with attachments embedded in the .eml file, or such that both email in PDF format and attachments can be downloaded. I suppose .eml format would be ideal.

I thought about using the script that already exists for Mail.app but that cannot be used as I need to do this while reading the email in the browser.

Has anybody else felt the need for this or has anybody written a script for something like this?

Thank you!

The web interface for email is not a good option for automation. Using Apple Mail is still the best option.

Got it and makes sense.

Now I am wondering if I can read some details from the online message and search for it in mail.app and then capture that found message into DEVONthink.

So the thought is as follows:

  • obtain the subject from the title of the page in Safari
  • obtain the time stamp when message was sent
  • then to launch mail.app (in the background if possible) using AppleScript and search for message based on subject and message time stamp
  • and then select the first message found and then import that into Devonthink

Is this doable you think? Are there any pre-existing scripts that can be leveraged to create this? The subject and message time stamp from the browser can be extracted using the page html text - that I should be able to do, although might need to use python for extracting the date using xpath or something like that.

Thank you!

Why don’t you merely use Apple Mail as the email client and forgo using the web interface?

  • mail felt slower to launch
  • it was harder to switch to folder - no shortcut
  • mail hub, a plugin that I used to make it easier to file, will stop working on BigSur it seems. would ideally like to have a shortcut to file messages (short cut that brings up a list of folders to search from etc)
  • like to have images not show for every sender but for some senders and in mail.app it is an on/off switch as opposed to showing images for those in address book (which allows more control)

with that said, perhaps you or others have found solutions to these issues and I can live with some of them.

and as I think about it, perhaps I can create those shortcuts using keyboard maestro or something.

and may be the recent updates to mail.app allows for selective image showing (remote content showing).

Thank you Jim for discussing this and asking the question.

You’re welcome :slight_smile: