Using mailto: in a web dialog

Isn’t it possible to use a mailto: in a web dialog. When I test my html in a browser the mailto: function works perfect, but when I use these html code in a web dialog nothing happens when I click on the object the mailto: is defined on.

OSX, Windows or both?

At this moment I just tested it on os x, both I need it on both.

I just tested in Win8. It worked there.
I found that it also worked with UI.openURL('mailto:me@example.com'). Maybe that works under OSX? I have to test on OSX before I can say what is going on there.

1 Like

UI.openURL(‘mailto:me@example.com’) works on OS X
Thank you very much!

1 Like

When I try this code on Windows 7 (SU2019) I get a message showing behind the SketchUp window without showing on the taskbar. The only way to see it is to minimize SketchUp. When I later close SketchUp it bugsplats.

Anyone else seeing this?

2019-04-29_17h21_27

EDIT: The bugsplat only seems to happen from the code in my own extension, not from simply running this short snippet in the Ruby console. The latter however seems to prevent the SketchUp window from reacting to keyboard shortcuts.

When I tried UI.openURL('mailto:me@example.com') from SU’s console within SU2018, on a recent Win10 machine that has never had email setup … (because I use Mozilla Thunderbird to access my Google accounts via POP,) … the following pops up on top of the SketchUp application …

image

Note that this is a popup of the Windows Store Mail App that comes preinstalled on Windows.


So, I think it doesn’t matter whether using a HTML mailto anchor tag, or using a callback to Ruby that uses UI.openURLboth will be at the mercy of whether the user has set up a default email client.

I wonder how many people has a program associated with mailto-links. Personally I’ve always used the web based client for whatever web service I use, ever since I first started using emails. For my use case I’ll try something else than mailto-links.

But it is easier if you have more than 1 account. I have 2 Gmail accounts and 2 accounts from my ISP and can get all at the same time by just opening Thunderbird.

I’ve never managed to get mailto: links to open my gmail tab in Chrome - despite Chrome offering how to handle it. There might be a way - but it was so clunky that I never really pushed on to really solve it.

I think a contact form will be more reliable.

1 Like

When thinking of it, the option I’ve seen to use Gmail as default email client was probably implemented at browser level, not system level. This pretty much rules out using it in an extension.