Linking fastmail

We’ve had a request to support fastmail.com . Someone suggested we support fmail app which was built for. we put together some AppleScript for the latter,

tell application "FMail"
	set email_address to getAddress
end tell

tell application "System Events" to tell process "FMail"
	set email_title to name of window 1
	set AppleScript's text item delimiters to {" – "}
	set email_title to text item 2 of email_title
end tell

return "[" & email_title & "](" & email_address & ")"

but that doesn’t seem to be an established app.

Anyone here use fastmail.com? If so, do you know if the URLs of their web interface to emails contain the RFC compliant ID in them?

Hello,

I’ve used Fastmail for many years – it is a very good service.

There is no Fastmail application for Mac, as far as I know. There is an app for iOS and one for Android – https://www.fastmail.help/hc/en-us/articles/360060590873.

I’ve had no trouble Hooking to emails in the web interface of Fastmail (using Safari). I also use MailMate, and I assume that would work, too, though I can’t remember having tried it.

Cheers,
Martin.

The only app for MacOS is FMail - Home

It is already updated for both Big Sur and M1 chips.

The creator has listed this as the AppleScript for Hook:

Open Item
(No script required)
Set scheme to email

Get Name
tell application "FMail"
  get name
end tell

Get Address
tell application "FMail"
  set theURL to getAddress
end tell

Hope this helps!

Ah, OK, that’s a 3rd party application I didn’t know about. However, the home page states that links to Fastmail emails open in Mail instead of the web interface. That is not what I find. Links open in the web interface for me – I have just tried it. So I don’t know that FMail is needed – though I didn’t look to see what else it offers.

1 Like

Welcome to the Hook Productivity Forum , @dixonge . and thanks for sharing that.

Did you try with the AppleScript we provided in the OP, or theirs?

In any event, our developer here who wrote the AppleScript in the OP says “I think Hook works fine with FastMail in browser.” I myself haven’t tried it.

A key question is whether fastmail.com email URLs contain the RFC-5322-compliant message ID, which would make them in principle interoperable between different mail apps [which is kinda the point of email being a protocol…] or whether the IDs are not app-specific (Readdle’s and Outlook’s are app specific, even instance specific in the case of Outlook). Links from Mail, MailMate and AirMail are interchangeable.

1 Like

@mbbcam You have to tell macOS to change the default email client (you have to do that in the Apple Mail Preferences).

I have tried the script above from @LucB and it just works. In the Hook Preferences you add FMail to the Scripts and paste the AppleScript code under the ‘Get Address’ tab.

1 Like

Welcome to the Hook Productivity Forum , @arie. And thanks for testing that!

I use it mainly as a way to access my inbox offline, partially. I also heavily use aliases in Settings and moving back and forth in the app is faster than the web usually. But now that you mention it I really want a way to access all emails even when offline so may have to look into alternates. Or just use the web site, I don’t know…

1 Like

For me, Hook worked straight out of the box with the Fastmail web interface, so it never occurred to me to think about it. In fact, I was quite surprised to see the thread. I have configured nothing at all. In fact, I’m not sure I would know how to change anything :slight_smile: I just wanted to Hook to an email, so I did.

1 Like

I wasn’t clear enough in what I wrote, perhaps, but it doesn’t matter. My default email client is MailMate, but I can still get email links to open in the web interface. Though, reflecting, that might be because I have Choosy installed on my system. I’ll have to check the documentation. In any case, I’m afraid FMail is probably redundant and unneeded for me.

Cheers,
M.

1 Like

I tried Hook in the FMail app and so far it doesn’t see anything to hook to. Fastmail web app works fine…

Your quote did not contain the entire script. Was that intentional?

the quote itself was unintentional. I included the entire script in the Get Address tab but Hook still could not find anything to hook to.

thanks for letting us know. Given that the fmail dev , another dev and another person have tested successfully, my guess is that the is one the other issues listed here: No Linkable Item in … – Hook.

I tried those but nothing has changed. Removed and re-added to Automation. Removed and re-added in Scripts tab in Hook. Restarted both FMail and Hook. So far nothing has changed.

The script you mentioned in the OP - that’s supposed to go in the Get Address tab, right?

Does it work if you run it from Script Editor?

That’s a good question. After I figured out what ‘script editor’ was, I opened FMail, selected and email, and then ran the script. This is the result:

"[[Hook Productivity Forum] [Discussion & Help] Linking fastmail | Fastmail](fmail://T727d0e8e694988de.M8407c0b332d68de92612820e)"

So that is definitely the title of the email I had selected. I guess that works? Not sure what my next step should be…

Thank you! That’s correct.

First, could you please update your script to the latest one?(164, it has the script for FMail) Then go to Hook Preferences Window-> Scripts->FMail , click on “Reset to Default” button. Try it again and see if it works.

If it still not works,
Could you please
(1) Open /Application/Utilities/Console
(2) Click on Start Streaming
(3) Type hook in the search bar( on the top right corner of Console window)
(4) Select an email in FMail
(5) Invoke Hook on FMail
(6) In Console window, Click menu Editor ->Select all, then Click menu Editor ->Copy
(7) Paste in a text editor and save as a .txt file
(8) Take out private personal information if there is any
(9) Send the file to support@cogsciapps.com

Thank you!

1 Like

That did it! I can now go into a local file, open the Hook window, double-click the link to an email, and it will open the FMail app and take me right to the hooked email!

Game-changer!

1 Like