-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support adding attachments to e-mails #2432
Comments
Option # 1 is prefererable from a point of view of compatibility with existing code - certainly clean-up afterwards would be a must. For option # 2, For that matter they're not mutually exclusive, both options could exist side-by-side. |
@davidjohnoliver I am only worried that when we do both, microsoft/microsoft-ui-xaml#1 will be immediately discoverable and the developer will never find out that microsoft/microsoft-ui-xaml#2 is the more efficient choice (unless they explicitly check the docs, but you cannot check docs for everything 😀) |
Valid, but I think the same problem would exist if we were to only implement # 2: people will see that the UWP method is NotImplemented and they'll figure that it's just not supported. Discoverability is hard! |
@davidjohnoliver Okay - what about doing both and add a comment to microsoft/microsoft-ui-xaml#1 that suggests using microsoft/microsoft-ui-xaml#2 instead. Potentially there could be a Roslyn Analyzer in the future as well, with such a suggestion. Last question - when to do the backup cleanup in case it, for some reason, fails after the e-mail is sent? Startup could work, but we want to launch as fast as possible. It could run asynchronously though. And the deletion after sending should fail only occasionally anyway. |
Sure, some remarks in the xml doc of # 1 drawing attention to # 2 (and vice versa) would make sense. For the backup cleanup - maybe do it the next time the app tries to send an email attachment? Agreed we wouldn't want to slow down launch for this case. |
One thing I am worried - if using the API is a one time thing, we would have a dead weight adding to the app size forever there 😕 |
Any update on this? |
For plain E-Mails this is mostly a non.issue, but since mail-URIs do not support attachments they just end up getting scrapped while letting the API's consumer know nothing of this. (On iOS this can become quite the nuisance as Hence my suggestion is to not adopt the same mistake and let the user know of that case, perhaps through throwing an exception when an attachment is passed but the fallback initiated. |
A possible workaround is to use MAUI essentials, until uno supports |
What would you like to be added:
Uno Platform implementation of
EmailManager
currently does not support e-mail attachments. The problem is that Andorid and iOS support file-based attachments only, however UWP API is fully based on streams. There would be two options:ApplicationData.Current.TemporaryFolder
, as that one should get cleaned up by the system automaticallyWhy is this needed:
To send files with e-mail. It is often used for sending crash-dumps.
For which Platform:
The text was updated successfully, but these errors were encountered: