Open Bug 1806818 Opened 2 years ago Updated 3 days ago

[flatpak] support for email portal

Categories

(Thunderbird :: OS Integration, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: jhorak, Unassigned, NeedInfo)

References

(Blocks 2 open bugs)

Details

There's a 'new' email portal for sending emails under flatpak [0]. It uses the mailto: uri to start the compose dialog [1]. Unfortunately the attachment attribute of the uri is not supported by Thunderbird - I guess for security reasons.

We could probably modify the email portal to set the right arguments using -compose 'attachment=/file1,/file2.'

But there's a bummer for Thunderbird flatpak, the host paths are not reachable in the flatpaked Thunderbird. The flatpak run supports --file-forwarding option which maps the host file path to be available in the flatpak app, so far so good:

--file-forwarding

    If this option is specified, the remaining arguments are scanned, and all arguments that
 are enclosed between a pair of '@@' arguments are interpreted as file paths, exported in
 the document store, and passed to the command in the form of the resulting document
 path. Arguments between '@@u' and '@@' are considered uris, and any file: uris are
 exported. The exports are non-persistent and with read and write permissions for the
 application. 

But the file arguments supposed to be in the regular format, like for any other linux command, ie. each file divided by space. Only then it is mapped to the flatpaked app. The thunderbird has different commanline parameters to specify multiple attachments. We could have special thunderbird launch script just for flatpak to transform the list of parameters into the --compose params. But that won't work for the regular Thunderbird.

The https://github.com/flatpak/xdg-desktop-portal-gtk/issues/356 is also relevant to this.

[1] https://github.com/flatpak/xdg-desktop-portal-gtk/blob/main/src/email.c#L26
[0] https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Email
The flatpak

Type: defect → enhancement
Blocks: snap

Gentle ping to Daniel and Heather to see if this can be explored and an action plan can be defined for post ESR.

Flags: needinfo?(heather)
Flags: needinfo?(daniel)

I'm looking into this now, in tandem with bug 1869373. I'm going to leave the needinfo for me in place until I've done more testing on using Flatpak isolation with Thunderbird.

See Also: → 1869373
You need to log in before you can comment on or make changes to this bug.