in my extension, I need to save a selected message as text/eml file.
Using the messenger.saveAs(...) method (like below) causes the filepicker to show up.
Is there any way to save the selected message as a file automatically (without any user confirmation)?
In my extension, I want to "duplicate" an email and replace several attributes such as the content and some header information.
I thought it would be easy to save the message as file, read and write stuff to it and then import it again...
The marked steps are problematic for me...
----
excerpt from my current code, where the file picker pops up
Code: Select all
mailmessageUri = aMsgHdr.folder.getUriForMsg(aMsgHdr);
...
messenger.saveAs(mailmessageUri,false,null,"C:\tmpMail.eml", true);