Sending an Email from a Firefox Extension with an Attachment - firefox

I've been developing a firefox extension, which needs to send an email through the user's email client when a button is pressed.
I've been sending email by simply using a mailto like this:
function sendEmail(buttonEvent){
gBrowser.addTab("mailto:example#example.com?subject=Hello World");
}
But I need to add an attachment to the email that is being sent.
I understand that a mailto link can have an attachment under some versions of Outlook, by using an "?attachment" like this: mailto:example#example.com?attachment=""C:\example.txt"", but I've heard that's not cross platform, has been removed from the newest versions of Outlook, so this isn't a real option.
With that in mind, is there anyway to send an email with an attachment in a Firefox extension, without using server side code?

I'm pretty certain that Firefox doesn't have this ability out of the box. This answer shows how one would do it in Delphi - apparently, using OLE is required if an attachment needs to be specified. What you could do is writing your own DLL that would implement this approach, distribute that DLL with your extension and call it via js-ctypes.
You won't get a cross-platform solution this way however, you would need to write similar native libraries for Mac OS X and Linux. And then you have the problem that the user's "mail client" doesn't have to be an application, it could be a web application - and then you definitely cannot attach files to a draft message.

Related

Link sms on chrome, edge or other on pc/windows

As we can see from this topic
How to pre-populate the sms body text via an html link
it is possible to generate sms links that work perfectly on smartphones.
But when I click on it on my browser while I'm on the pc running windows 10, nothing happens. The link is simply ignored even though it is totally abnormal.
Don't tell me that this is normal, NO! There is the application "My phone" which is installed and which makes it possible to send sms with the PC, to answer them, to see the notifications or even the photos of the smartphone. So the pc can send sms via this application which is from microsoft and I am on a microsoft system. I often use it to write my sms. But the browser (chrome for example, but also edge for example) does not work while they should transmit the request to the application "my phone".
My question is :
How can I add parameters to the system so that it works?
It seems like such an obvious question that I'm surprised I haven't seen similar ones on the internet despite long searches.
Thanks to those who will answer and especially to those who will give a solution.

How to record the event that an attachment from Outlook has been clicked to run or downloaded to the disk?

I am developing a solution to monitor security events on Windows.
Two of the events to monitor are:
an attachment from an email (Outlook) has been clicked to run or downloaded to the disk
a link from an email has been clicked
Does anyone have experience in how to achieving these two things?
There are at least two ways I can think of to do this.
Outlook Extension
The easiest is to write a script. The MailItem.BeforeAttachmentRead lets you see what the user is going to open/save, and even allows you to cancel it if you find it suspect. You can also use several other related event hooks to customize the experience (check the docs). No hardcore kernel-level programming is required.
Kernel Hook
You could also implement a generic file hook that runs in the background and reports activity from the Outlook executable, but this is probably more cumbersome than it needs to be. The Windows API allows you to monitor when files are created, but you wouldn't be able to see specifically when an attachment is previewed (as far as I could determine from the docs).
Either way, you can then deploy your package through a Group Policy Object so that it can be invisibly installed without the user's knowledge. Once installed, you can choose to log those attachments through the usual channels, such as an Event Log that can be viewed in the Event Viewer.

How to get trace report of Outlook sending mail in external application?

Usually my ERP system has a feature, that you can rightclick on a bill or an order and say "send as email". You fill out a form, klick on send and a security warning appears:
A program is trying to send an e-mail message on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date.
Then this ERP (Lexware) places an email in my outlook, including the bill or order as attachment.
The mail is there, but only very seldom also the attachment.
I tried to run both applications as administrator, same result. Also disableing my virusscanner produced the same result.
We have Windows 2008R2 (x64) and Outlook 2003 (32Bit). Both are on newest patches.
I would like to know how I can find out what is blocking the attachment. I don't find any logs. How can I trigger this myself with a script to send a mail over Outlook? I want to understand the process behind.
This does not sound like a programming question. Make sure your system has an up-to-date anti-virus app installed - this way Outlook will not display security prompts.

Is it posible to Integrate web application to microsoft outlook or word?

Like how it asks email attachemnts to save directly to google drive or one drive . same way i want to get one more option that is my application.
It looks like you need to develop a Mail App which is based on JavaScript and HTML (+CSS). See Mail add-ins for Outlook for more information in MSDN.
Also see Word add-ins.

Windows phone 7 develop app that opens mail attachment

Is it possible? I want that if the attachment is of a particular mime type my app opens it or it will be listed as one of the possible viewer choice... I googled but i found nothing so I'm asking myself if it is possible on windows phone.
this is not possible... the only way to open a file that has a known mime type is to use a web browser task and to pass a Uri.
You cannot associate MIME-types directly in your application in Windows Phone 7. Your best bet would be to have the user download the file through your application.
Simply saying, you could take a potential workaround of sideloading an application that "fakes" the GUID of an application that is associated on a system level. I wrote about that here. Your problem is, however, the fact that you won't be able to access the file system without proper permissions.

Resources