I'm going to develop an outlook plugin that detach huge attachments from the email and upload such attachments to an FTP site.
In my first version of the plugin i did all the work in the Application.ItemSend event, but when the attachment are really huge (greater than 1GB) this solution is unsatisfied because the UI freezes while the user uploads the file.
A mandatory requirement is that the email should be send only after that the upload to the ftp site is finished. Any ideas about a better way to implement an outlook solution ?
Do you mean the UI freezes while you upload the file? Display a modal dialog while the upload is still in progress and do the actual upload on a separate thread.
Related
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bots-filesv4 describes a consent-based file sending process where a bot receives a users consent to upload a file to their onedrive and is able to send a FileAttachment card which renders a nice File chicklet view in the users Teams client. The chicklet view lets the user view the file in the Teams built in browser or download it or save it etc. More sample code here: https://techcommunity.microsoft.com/t5/microsoft-teams-blog/working-with-files-in-your-microsoft-teams-bot-preview/ba-p/199441
The final file attachment JSON looks like this
{
"attachments": [{
"contentType": "application/vnd.microsoft.teams.card.file.info",
"contentUrl": "https://contoso.sharepoint.com/personal/johnadams_contoso_com/Documents/Applications/file_example.txt",
"name": "file_example.txt",
"content": {
"uniqueId": "1150D938-8870-4044-9F2C-5BBDEBA70C8C",
"fileType": "txt",
}
}]
}
The rendering on the Teams client looks like this (taken from a different file send). Clicking on the icon opens the Teams built in File Viewer and
In our case our bot is already hosting a set of files that it needs to send a user. We can obviously just send a URL to the file location using Markdown but that causes the Teams client to download the file, user then has to go locate the file in their Downloads folder, and then view the file. (A multi-step process to view the file)
We are hoping to find an attachment type that has the same UX as the built in FileAttachment above i.e does not rely on first uploading to user's onedrive etc. When we try to use the same FileCard format but use our own contentURL , the click actions, unsurprisingly, fail.
Q: Is there a similar attachment type available in the Bot Framework for Teams which will generate a similar experience for the user (nice chicklet view, leverage built in Teams viewer, with option to open in browser or download) but with a file that is hosted by the bot at a reachable web URL (rather than first uploading to a user's One Drive)? Anyone attempted to do this using an adpative card?
(p.s sending image files has a work around which causes images to render inline, so this is about other file types such as PDF or Powerpoint)
Unfortunately, there isn't a built-in card (or a version of the File info card) that supports downloading from arbitrary urls - this can only be used for files hosted in OneDrive or SharePoint (depending on the context).
One possible option is to display a "regular" adaptive card with an action that launches a task module and then handle the file download yourself from there using JS and the Teams SDK.
My (editor-like) Windows desktop program can create a new e-mail with the current project attached using MAPISendMail. A customer wants the same functionality for Microsoft Teams.
For the web version, I think I can probably do that with Graph API.
But I can't find anything for the desktop app version. Is there a way to do that?
Bonus:
It would be great if the user could manually specify recipient + body text in Teams (and not in my program).
So you can't actually attach files to messages directly - you basically upload the file to a web location, and then provide a link to the file in the message. As an example, you can upload to the SharePoint document library that exists in the "Files" tab (something like this). Then, in terms of sending the message, you can send to a Team/Channel quite easily using a Webhook. This does not support #mentions the moment though. Another option is to use Graph to send the message.
If you're wanting instead to send a kind of 'private' message to the user, you'd need to look into creating a bot, and sending a 'Proactive' message
I've a big problem because some eml file that are imported in the customer repository (IBM ECM) and retrieve from IBM Content Navigator.
This client demand the opening of this kind of file to the operating system and therefore to MS Outlook.
It occurs only for some of the emails and, by exporting the email and opening it with a test editor, it becomes clear that the problem is due to a series of null characters placed as the last line of the body of the email (I've attached a screenshoot).
Is there a way to allow Outlook to view these emails correctly?
Thinderbird for example also opens these emails without problems but the custome cant use this client, only MS Outlook is permitted.
Thank you in advance
email body
Short Version:
I want to open any specific Outlook email from my Java app, either locally through the Outlook app or through the website on a browser. I already have the email information like folder, message ID, UID, sender, receiver, etc but not the email ID used in the URL of the Outlook website. Does anyone know of a way to do either of these things through Java?
Long Version:
I'm creating a software for my company in Java that has a built-in email client for Outlook emails so the emails can be linked with jobs in various ways. So far I've been able to make good progress with the email client section in terms of displaying a list of emails and being able to display a chosen email, but recently I've realized creating a GUI for an email editor (keeping track of reply chains, dragging in images for inline attachments, etc) is quite the gargantuan task to do on my own(JavaFX's HTML Editor could use a lot of work).
My band-aid solution for now is to have my program open the chosen email up through either:
Some (Windows 10) system command by calling the Outlook desktop application to show the email by some sort of ID (maybe UID?). I know on some level that this is possible because our company has an old program written in C# that can indeed do that.
Opening up the system's default browser with a link to "https://outlook.office365.com/mail/folder_name/id/insert_id_here". This is my preferred solution.
Here are my problems with each option so far:
There doesn't seem to be any resource I could find that provides an answer to this. The closest I can find are threads that explain how to open the default mail application with options to pre-populate to/from/subject/body sections (not to mention you can't pre-populate the body with anything besides text! So much for reply/forward messages with HTML formatting and attachments!). Another problem is that the old program I mentioned displays emails by finding the Outlook application's files (presumably the local OST file). I have no idea how the old program's able to call Outlook to show emails and even then, there's a chance that there's no Java equivalent. I, however, am using JavaMail to load up my mail, as I think it's better to talk to the Outlook mail server to fetch/push mail updates rather than wait for the Outlook app to sync up. This creates a problem because even if I knew how to call Outlook, my application may be more up to date than the Outlook app (especially if Outlook is not already open) and if call before Outlook updates, Outlook wouldn't be able to show it.
Again, I can't seem to find a resource for explaining these URL IDs. They're not the same as the mail's UIDs, and they don't seem to be anywhere in the mail's contents when grabbing mail through JavaMail. The most I was able to get from research was that they were called "long IDs", as they were just long strings (seemingly non-sequential) but that might've just been a made-up name from the article as I've found no other references to it. There's a chance that they could be some sort of encoded UID but I didn't see any note of JavaMail having to decrypt to get UIDs in the documentation. I doubt I'd be able to make any more progress with this option, but if there's a solution similar to this (perhaps some sort of script that opens up Outlook online, searches by some identifier, like body contents, and pulls up the first result? Idk much about browser scripts) I'd be happy to hear it.
In phone7 development, being able to send an email requires the use of the email task. This object doesn't not have an attachments property, and many ppl on various forums have complained about this particular lack of functionality. The problem is that Microsoft applications such as the picture gallery and OneNote have the ability to attach images and sound recordings to emails. This implies that there is a way to attach them.
Question: Is there a "hack" or other method that can be used to send emails with attachments in phone7?
No, there is no way to send attachments via the EmailComposeTask in a third party app. If you don't want to use an EmailComposeTask, you could create a server that runs a webservice which performs the sending of the email. Your app could then upload the attachment to that webservice.