Closed Bug 166541 Opened 22 years ago Closed 3 years ago

Add support for X-Unsent property in .eml files

Categories

(MailNews Core :: Composition, enhancement)

enhancement
Not set
normal

Tracking

(thunderbird_esr78 wontfix, thunderbird91+ fixed)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird91 + fixed

People

(Reporter: djst, Assigned: TbSync)

References

(Blocks 1 open bug)

Details

(Whiteboard: [workaround: try addon from comment 25])

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020903
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020903

If you open a .eml file that contains the line "X-Unsent: 1" in Outlook or
Outlook Express, a mail compose window will appear instead of the normal mail
window.

This will allow you to send large e-mails from another application to a compose
window. For example, I use this in a text editor where you are able to write the
e-mail in the editor, then when you're finished, you can send it to a compose
window in Outlook/Outlook Express. 

Can this be supported in Mozilla as well?

Reproducible: Always

Steps to Reproduce:
1. Create a simple .eml file with "X-Unsent: 1" in it.
2. Open it with Mozilla.


Actual Results:  
The contents of the .eml file is just displayed (in a browser window!).

Expected Results:  
An editable compose mail window should appear, allowing you to send the unsent
message.
Status: UNCONFIRMED → NEW
Ever confirmed: true
sound a nice feature to have. Accepting
Status: NEW → ASSIGNED
Product: MailNews → Core
Blocks: 269826
No longer depends on: 269826
Assignee: ducarroz → nobody
Status: ASSIGNED → NEW
QA Contact: esther → composition
Product: Core → MailNews Core
X-Unsent support lacking for 10 years now
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Could someone fix this 10-year old annoying yet probably simple bug? Since reported (Wed 04 Sep 2002) this Bug 166541 (Add support for X-Unsent property in .eml files) has been restraining TB power. I confirm that, today Sun 16 Sep 2012 in Windows 7 Ultimate 64bit with Thunderbird 15.0.1 being the default email handler, double-clicking an .EML file in Windows Explorer still opens the message in a DISPLAY (static) TB window *in all cases*, thus ignoring the eventual "X-Unsent: 1" line in the MIME header.

I recall that this "X-Unsent: 1" line marks the message as being "unsent", thus editable, hence instructs to open it in a *COMPOSE* TB window (NOT a "display" one).

For those not familiar with Outlook Express, this "X-Unsent: 1" line:

- is added by OE when the message is saved by "OE > New Message > File > Save As" (and choosing a location in the Windows File System, say "C:\My\OE\Templates\Letter to Family"),

- but is NOT added when the message is saved by just "OE > New Message > File > Save" (which will just save it in OE Draft pseudo-folder),

which makes for a very convenient and productive template: you build your template and save it with "Save As"; then to use that template, you just double-click it (or open it from a shortcut), you write your New Message and send it (or save it in Draft using "Ctrl+S"), which keeps your template itself unaffected in its "C:\My\OE\Templates" folder.

This is one more of the little things that, when they get solved, will make TB beat hands down OE, that beside its great qualities has multiple big bugs that TB has not, e.g. errors when editing an UTF-8 HTML message containing NONASCII characters (frequent and big crippling of messages), lack of direct toggling threaded display on/off, inability to send an HTML message sans PTA (Plain Text Alternative), HTML closing tags added in wrong places or unduly removed (which sometimes cripples the document or badly freezes the PC), and some.

Versailles, Sun 16 Sep 2012 21:51:00 +0200
Our application (java based) is using .eml files to generate a draft email (with attachments - hence limited other technical alternatives than .eml file) and open it with the default mail client.

Due to this bug, we are - unfortunately - advising our users to configure Microsoft Office as their default mail client.

We believe it would be a win-win (for us and for TB) to have this bug solved.

Many thanks !
Hi!

I'll also sign it with my both hands and feet. Like Thomas said, it's not to cool to advise my customers to use Outlook when they don't want it or simply can't have it.

Cheers!
Ditto, some movement on this would be good please. After efforts to make our e-mail integration more product agnostic we ended up stuck with this and still have to advise customers to use outlook.
(In reply to damian_bailey from comment #6)
> Ditto, some movement on this would be good please. After efforts to make our
> e-mail integration more product agnostic we ended up stuck with this and
> still have to advise customers to use outlook.

Since you appear to be a developer, why not contribute a patch? All (non-maintenance) work on Thunderbird is currently done on a volunteer basis, and there are plenty of people in #maildev on irc.mozilla.org who'd be happy to get you started.
Please make contributing clearer and easier
~--~--~--~--~--~--~--~--~--~--~--~--~--~--~
(In reply to Jim Porter (:squib) from comment #7)
> Since you appear to be a developer, why not contribute a patch?

I too am willing to contribute to TB. Yet when searching how to, I fell in an ocean of unclear redirections between many different uncertain repositories or persons involved; it was impossible to guess where to go, what to do, or whom to contact, so I gave up.

If anyone is really willing that some others come, then they should at least cease to make everything as intricate and obscure as possible.

Versailles, Fri 05 Apr 2013 10:49:00 +0200
Here's the most relevant summary for contributing: https://developer.mozilla.org/en-US/docs/Introduction

However, the best way is probably to talk to people about it directly.

If you prefer IRC:  #maildev on irc.mozilla.org
If you prefer mail: https://mail.mozilla.org/listinfo/tb-planning
If you prefer NNTP: mozilla.dev.apps.thunderbird on news.mozilla.org
And if you're eager to get building, see https://developer.mozilla.org/en-US/docs/Simple_Thunderbird_build - after you got a patch put together, attach it to this bug.
*BUGZILLA*

2002-2014

Considering a header line to open an eml "editable" & saving edited emails as eml including the header . .. this is extreeemely hard for tb's developpers to add to thunderbird.. maybe we should try to motivate creators of addons to do a gesture, email them all until someone tells us "i'm not so bored or can offer u a lil bit of my time to improve the usability of a popular email client .. .

zzzzzzzzzz
Is this feature still supported in recent Outlook?
most probably, it would be pure & total vanity from microsoft to impose 
such regression in terms of usability.
Others have also suggested to right click & select edit as new, which makes the edition of saved messages in edition mode longer to access, also, selecting that option opens a new window leaving the main "uneditable static email window" in the background, so i also have to delete it after .. . Treating messages as edition mode in the internet headers field eases usability. many people save messages on their desktop or elsewhere besides the email data folder to reuse them & nothing else, since viewing/reading messages in the email client doesnt involve the need to save them outside the email client.
(In reply to ukrainianconsular from comment #13)
> most probably, it would be pure & total vanity from microsoft to impose 
> such regression in terms of usability.

1st the actual MS email client was OE (Outlook Express), not OL (Outlook). Under very similar similar
names and interfaces, those are deeply different programs; OL, targetting enterprises, was heavier; OE was more intelligently designed and (aside the integration with Exchange) much more powerful for email.
with Microsoft did much worse: it simply rem

2nd Microsoft did a much worse regression than removing a simple feature: it simply removed ... OE itself!! Very bad since OE, after the demise of a couple great programs, had become the only serious email client available to end users. Thunderbird once had a chance to challenge OE, but has lost it, stopped improving, and given up any hope of recovering, so it' no longer able to make a decent replacement for OE.

Versailles, Tue 08 Apr 2014 20:11:40 +0200
lol Michel, i don't give up, even if development is extremely slow at bugzilla, cause tb is the only one actually, able to adapt a personalized email client per user's wish since it supports addons. so there's always hope & possibility to update it. & your first mention doesn't contradict me at all, if you're not aware, you should test all microsoft email clients, from ms exchange, oe, live mail, windows mail, up to ms outlook, they all insert the X-unsent: argument in the internet headers. if that argument is included in tb, it adds more compatibility among those email clients & ease to exchange emails & view them & treat them from your desktop. i could ask a different argument than x-unsent here, to make emails i save in edition mode opened in "composition/edition" mode automatically, but it would be dumb cuz it would exclude the compatibility & direct access to eml files from a client to another..

also, tb supports javascript, so everything's feasable, but devs pay less attention nowadays,
unfortunately, that's why i can't rely on tb's author's developpment's area (bugzilla) only.

i have to contact many addon makers too because if i leave a message a year or 10 later,
there's a great chance this usability improvement remains ignored 10 years more later
seeing how things r going here.. 

But i can't cross my arms. nor make prayers on that page at every xmas..
That was my point. The report says Outlook express supports this. I know that one is dead so I ask if a current version of Outlook still supports this.
why would microsoft remove it ? smiles ))

you can edit messages & save them the way you left them, in the state you left them
& in all editable fields, why do you think they'd want to get rid of it aceman ?

or why would they change x-unsent: to  x-itsunsent:

& i've tasted it, yes, the latest ms outlook adds that header argument.
tested*
even groupwise, & i could list others..
I even tried to start an eml file with:  c:/tbslocation../thunderbird.exe c:/x.eml -compose but it opens two windwows, the static email+ an empty compose window .. .

Even tb doesn't save eml, i have to use the addon importexporttools, but that addon only allows me
to right click on static emails in the view list & save as mail files (eml)

I can't save an eml in edition mode through the file/save as menu.
TB needs to HONOR the X-Unsent MIME header
~--~--~--~--~--~--~- ~--~--~--~--~--~--~--
(In reply to ukrainianconsular from comment #16)
> tb is the only one actually, able to adapt a personalized
> email client per user's wish since it supports addons.
TB addons mostly are poor and don't cure TB's flaws and lacks. For instance EditHTML, being only an additional interface, still relies on TB's HTML engine, with its grave flaws, e.g. Bug 766073 - Dragging a msg from TB into Windows Explorer adds wrong Date and Contents to the created .EML file, Bug 787434 - Insert HTML deletes "empty" tag pairs. And none of such addons, after 10 years, has made TB able to honor "X-Unsent: 1", or has fixed other bugs like Bug 766073 or Bug 787434.
> you should test all microsoft email clients,
> from ms exchange, oe, live mail, windows mail, up to ms outlook,
> they all insert the X-unsent: argument in the internet headers.
Commenting what you never tested, being or not your way, isn't mine. I commented about OE, OL, TB, that I have tested and used since 1998, extensively as my main email client for OE (after CompuServe, Netscape Messenger), as my secondary ones and testbeds for TB and OL. Live Mail, that I only used for tests, is (as OL) unable to edit HTML and MIME sources, and to follow (as OE politely and smartly does) the correspondent's settings. BTW what is required from these programs to work correctly is NOT so much to "insert" the "X-Unsent: 1", but to HONOR it once it has been inserted. And this eventual insertion is in MIME headers, NOT in "internet headers" (nor in HTTP headers).
> also, tb supports javascript...
Of course OE runs JS (and with more control than many), even if its JS engine hasn't been updated for a long time, but has no tool AFAIK to *edit* JS. I assume this is the same for TB and OL.

Now I basically agree with you (IIUC): "there's a great chance this usability improvement remains ignored 10 years more later seeing how things r going here".

Versailles, Wed 09 Apr 2014 09:44:00 +0200
This is the best way to create draft emails from external (i.e. ERP systems) providing receiver, subject, body, and attachments. This is extremely useful because user can have his complex email drafted by the system, and finish it in his favourite program.
I created an add-on which opens .eml files with "X-Unsent: 1" included in the compose window.
https://addons.mozilla.org/addon/x-unsent-support/
Note that it's still under review.
1.0.1 tested.

1.0.1: useless. no use at all. you can even delete it since it's supplementary data for nothing .. .

The new preference will change nothing since treating it as draft or template, if i send the email 
in a way or another & read live mails html code, all lines are Still very short, but sent from 
live mail & analyzed from live mail, lines are longer..

I'll reexplain the situation for everyone:


1. if i send the eml from tb, my full headers will appear as if they were broken & don't occupy lines fully:

                                                    <font
                                                      color="#000080"
                                                      face="Times New
                                                      Roman">
                                                      <div>Â </div>
                                                    </font>
                                                    <div><font
                                                        color="#000080"
                                                        face="Times New
                                                        Roman">
                                                        <div>Â </div>
                                                        <div>Â </div>
                                                        <div><span
                                                          style="FONT-FAMILY:
                                                          ; COLOR: "><strong><font
color="#ffffff"></font></strong></span></div>
                                                        <div><span
                                                          style="FONT-FAMILY:
                                                          ; COLOR: "><strong></strong></span>Â </div>
                                                        <div><span
                                                          style="FONT-FAMILY:
                                                          ; COLOR: "><strong></strong></span>Â </div>
                                                      </font>
                                                      <div>Â </div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

& if i send the eml from an ms email client, the full headers occupy the lines with less graphic spaces:

</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT color=3D#ffffff face=3D"Times New Roman"></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN style=3D"FONT-FAMILY: ; COLOR: "><STRONG><FONT=20
color=3D#ffffff></FONT></STRONG></SPAN></DIV>
<DIV><SPAN style=3D"FONT-FAMILY: ; COLOR: "><STRONG><FONT=20
color=3D#000000></FONT></STRONG></SPAN>&nbsp;</DIV>
<DIV><SPAN style=3D"FONT-FAMILY: ; COLOR: "><STRONG><FONT=20
color=3D#000000></FONT></STRONG></SPAN>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV><=
/DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></=
DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>

And if i make spam reports to send to abuse at times, i'd find it weird to send it aligned like the way it is when i send the email from tb ..  .
some of them would find it tiresome & won't want to read it (( I like & prefer the tb's html rendering engine because it's more compliant
than ms client's html encoding, but can't it be fixed so lines are filled and not look so small in the middle of the page in the headers ?
that would be great.

2. the same email sent from tb will arrive with 34kb & the one from live mail, with 16kb, looks like a bandwidth consumption if my emails
are longer (( is there a way to change that ?

3. And strangely, the tb's full headers version doesn't include a text version, is that ok ? or can this be a bad sign & increase spam detection
by email servers if the text version is ignored in the full headers ?


Fixes expected:

1) Make html code's lines longer & not as short as 3 words per line, there must be an issue
somewhere .. .

2) In the File menu, Save as, "Eml..." above "File" for those messages opened in edition mode .. .
Just downloaded Thunderbird in order to test our application that creates eml files and opens default mail client on users machine. And I am surprised with the fact that such well known application as Thunderbird simply cannot do it. And the bug is very old. Shame on you. I am uninstalling it right now.
(In reply to dobravzla from comment #29)
> I am insulting people with my comment? I've read the comments here and I see
> clearly this community attitude. "You say we have a bug? Nooo, you are so
> mean". I'm not going to participate in such an wrangle. And I don't use
> Thunderbird, so I have nothing to thank you for.

I had the same problem and i resolved it by looking for the thunderbird.exe path, obviously u don´t know where your costumers did the installation, so u have to look for it in the registry and open it with line modifiers. Hope this is useful, i couldnt find another solution. Windows live recognizes unsent eml files, windows live!! Mozilla should fix this...
(In reply to ukrainianconsular from comment #32)
> i tried to make valuable
> points & as long as i'm not 1) a coder 2) a member of the author's family,
> what is important in our eyes is automatically not in their eyes, which
> is called egocentricity.

No, it is called the open-source software. 1) Either you do it yourself, 2) or you persuade someone to do it for you. You can do the latter with money or by proposing an interesting task that somebody picks up just for the kicks.

In closed source you only have the money option.

So as you don't want to do option 1) and insult everybody that would be able to do option 2) it is no wonder this is stalled. You even seem to insult the guy from comment 25 who did the work for you and the addon is available for download.
(In reply to plieser from comment #25)
> I created an add-on which opens .eml files with "X-Unsent: 1" included in
> the compose window.
> https://addons.mozilla.org/addon/x-unsent-support/
> Note that it's still under review.

It seems the addon is now reviewed and is available for download. There are a whopping 39 users of it :) Which may indicate something about how many people really need this and are willing to look for it.

But there seems to be a lot of code. Do you think it could be shrinked radically if this was included in base TB?
Flags: needinfo?(lieser2)
(In reply to ukrainianconsular from comment #26)
> 1.0.1 tested.
> 
> 1.0.1: useless. no use at all. you can even delete it since it's
> supplementary data for nothing .. .
> 
> The new preference will change nothing since treating it as draft or
> template, if i send the email 
> in a way or another & read live mails html code, all lines are Still very
> short, but sent from 
> live mail & analyzed from live mail, lines are longer..

I am not sure why you analyze any HTMl code when the point of this request was to open msgs in the editor if that specific header is found. I see no claim that this was not implemented correctly in the addon.

What is the evidence that the bad HTML code you claim to observe is caused by that addon? HTML code is generated by the internal editor. If you claim that the junk HTML produced by e.g. Outlook got mangled when edited inside TB that that open a new bug. Of course unless you make it obvous the addon caused the mangling by sending some incorrect commands to the editor.
(In reply to ukrainianconsular from comment #35)
> oops, i forgot to add on my report that the guys also brag about the fact
> it's "free",
> even if you're not a coder or you're on gov's help or if it's a valuable
> option .. .
Yes, it is free for everybody even for non-coders. But nobody should have the feeling he has any right to request/brag/insult anybody because his pet feature is not implemented. You can do that in your paid-for apps. If your great Microsoft even allows you to visit any forum where you could misbehave in that way :)

Your "valuable option" was voted by 5 people + 2 dupes + 39 users of the addon.

Yes, we need to first finish options that are valuable for 200 000 users and similar, which we did for e.g. TB38.

> by the way wise aceman, have you read my comment n26 ? a year ago...
> & on comment 32, the fact i explained that this guy i asked to create this
> addon
> as a contribution abandoned it telling me he didn't have time & that he
> doesn't know
> how to fix it "actually" & a year later, he simply forsaken the addon
> forever.
No, I see no such information in the comments here. Only your claims. But nothing from the author himself.

> naturally aceman, explaining how carefull u r about ppl making valuable
> requests
> by ignoring us or bragging about the fact it's free so requesters should't
> expect
> anything after a 13 year old thread is INSULTIVE..

Yes, it is insultive to expect something when you have no moral right to do so. I don't know what you have done to help the project so that you can expect something in return and be so loud about it.
(In reply to :aceman from comment #34)
> It seems the addon is now reviewed and is available for download. There are
> a whopping 39 users of it :) Which may indicate something about how many
> people really need this and are willing to look for it.
> 
> But there seems to be a lot of code. Do you think it could be shrinked
> radically if this was included in base TB?

It definitely could be shrinked, but by how much I'm not sure.
Besides the add-on related stuff, the code consist manly of 2 Parts:
1. The added command line handler. If instead the already existing one (https://mxr.mozilla.org/comm-central/source/mail/components/nsMailDefaultHandler.js#267) would be changed this part would be a lot smaller.
2. Reading and parsing of the header part of the .eml file. Is there already a way to do this from JavaScript beside implementing it oneself, like I did? If yes, this part should also be reducible by a lot.

About the issues ukrainianconsular has with the add-on:
> 1) Make html code's lines longer & not as short as 3 words per line, there must be an issue
> somewhere .. .
As aceman already said (and I to him directly via e-mail then he mentioned it to me, if I remember correctly), this is not an issue of the add-on. Unless of course on expect the add-on to implement the whole sending process and not use the one from Thunderbird.
> 2) In the File menu, Save as, "Eml..." above "File" for those messages opened in edition mode .. .
There he is correct, this part is missing. But he himself is at least partly to blame for it, as his attitude (as I feelt it) was not relay motivation me to spend more time on this add-on.

To those interested, I saw 3 ways to do this (without changing code in Thunderbird):
1. Try to reuse the code to generate a valid e-mail from the editing window by creating a virtual dummy folder to save the message into (editing window -> virtual dummy folder -> .eml file). This is the way I tried, but there seemed to be a problem with iteration between my JavaScript code (the virtual dummy folder)and the cpp code responsible for saving a mail to a folder from an editing window, which I was unable to fix.
2. Use a real folder for this (editing window -> draft folder -> .eml file). Although clumsy, this would probably be a manageable workaround.
3. Implement the conversion (editing window -> .eml file) in the add-on instead of reusing parts of Thunderbird. I don't think this is a good way to achieve this.
Flags: needinfo?(lieser2)
Looks like it is ukrainianconsular that needs to learn to read and not claim stuff I have not said.

Anyway, I am not sure why File-Save As->file is not enough here. It seems to me it exports as eml file again.

Gonzalo, dobravzla, Michel, have you actually tried the addon from comment 25. What functionality is missing there?
(In reply to dobravzla from comment #29)
> I am insulting people with my comment? I've read the comments here and I see
> clearly this community attitude. "You say we have a bug? Nooo, you are so
> mean". I'm not going to participate in such an wrangle. And I don't use
> Thunderbird, so I have nothing to thank you for.

I don't see the history who marked your comment 'offensive'. And I also do not understand what comments made you think of that "community attitude". Up to your comments, the real TB community was actually helpful here. The feature was even implemented, in an addon for now. Only snarky comments came from unkrainianconsular, which you can see is not part of the community or TB developers.
Whiteboard: [workaround: try addon from comment 25]
"I am not sure why File-Save As->file is not enough here. It seems to me it exports as eml file again."

No, there's no *.eml in that menu, but:

html files
all files

so maybe i can amuse myself typing .eml all the time although i guess it's not hard to add.

"it seems to you it exports as eml file again"

lets try the "html files" saing mode: check your file, all mime headers are gone, no unsent state,
no eml format.

lets try it with "all files" saving mode: same result .. .

You probably haven't checked the content of your so called saved "eml" file..
even plieser explained you that he didn't implemented it..
² File/open: opens unsent eml files in a non editing mode, (i don't think the eml data is even treated)
unless (requested) i open it from the desktop (already implemented).
(In reply to ukrainianconsular from comment #46)
> "I am not sure why File-Save As->file is not enough here. It seems to me it
> exports as eml file again."
> 
> No, there's no *.eml in that menu, but:
> 
> html files
> all files

> You probably haven't checked the content of your so called saved "eml" file..

Right, I was looking at the options when saving a received message from its own window.
In composition window, only "Text files" and "All files" are in the menu.
So I can confirm that is missing, however that was never in the requirements of this bug. The request only appeared suddenly in comment 26.
It works from command line or it works if .eml is connected to TB. Question still why it does not work, when you import directly from inside TB via menu.
Attached patch bug166541_x-unsent.patch (WIP) (obsolete) — Splinter Review
I had the start of this at one time, so attaching it here in case someone wants to continue. IIRC it works for some case, but there are many other call sites that aren't covered.
Sorry in my comment 54 I forgot to mention the very reason for posting it: comment 44 had asked « Gonzalo, dobravzla, Michel, have you actually tried the addon », so I was recalling that I totally stopped years ago to use or contribute to TB so I of course did NOT try that add-on.
Versailles, Tue 13 Jun 2017 22:05:30 +0200
Ps: Michel Merlin, il va droit au but, il rigole pas lol. Maybe your persistence in expressing your grief
& regret every year or two makes coders realize that it's sad to have a good addon left unfinished in the full
treatment of eml data after a decade.. even if it's a form of complaint for some busy coders who take it this way,
at least, the project doesn't fall in oblivion, like a child waiting for an organ to be transplanted & hoping
to experience his full physical capacities.

Finally a gesture by Magnus who worked on the code, which is very kind. Hopefully, a coder with more knowledge
will review Magnus patch in order to obtain a final xpi update ))

Thanks Magnus.

Thumbs up!

Hi guys, I've now also encountered this issue trying to create a sample script for creating email templates.
Currently, with the X-Unsent support addon installed, everything works except for file attachment.
File attachment works with X-Unsent set to zero or without the extension. In contrast image embeds work fine.
Here's the script and sample eml file.
Hopefully this helps whoever tackles this next.

There's no point in being able to support eml & x-unsent,
if saving as "mail" (eml) ignores the x-unsent tag, that i always have
to add in a text editor since almost a decade. & noone cares
about fixing it. Can't you do something about it Magnus
or you ace ?

moreover, it stopped working since the last major tb update already killed a lot of addons.

Give me few day, i will make this extension as WebExtension ;)

Hi Gosparini,

Please consider adding the missing fixes i've been asking forever:

1st fix:

-Saving the
X-Unsent: 1
tag in the mime headers, above mime-version tag..
Everytime i re-save the edited file that initially contained the X-unsent tag..

(I keep opening my eml files stupidly in a text utility to add it manually, it's hell.)

2nd fix:

An option to save as Eml, directly from the edited email window:
at File/Save as/ Eml (above File...)

Already reviewed Gosparini alternative that is a sort of downgrade of Lieser's version,
while demanding money when i clearly requested a contribution.
Anyone else besides Gosparini ?

To be clear ...

@ukrainian.consular doesn't know make the diference between Mozilla's Employee & Free Volonteer ...

I just pointed out to our friend, that a simple "thank you" or "sorry" for some time working on a volunteering basis was more appreciated than a lot of insult because "it wasn't perfect like before "

I've make an alternative to this addon because xul is today deprecated, and WebExtension doesn't provide all the previous existings functions.

If you want to try my addon :
https://addons.thunderbird.net/fr/thunderbird/addon/elm-editor/

You've got 2 buttons :
1st button on the main screen, allow you to choose an eml file to edit
2nd button, allow you to save your mail as eml file

  1. Nobody asked you to contact me with your initial release as a so called contribution, to then pretend with your high assumptions
    that giving you the issues is being insultive. & replying with "Ok ...

you're not paying me to make that ? True or False

I'm working on this for free, you're not the boss, and you will never be ..
Keep this information in a corner of your head."

So the only person insulting here is the flaming coder that talks about a corner of my head with UNSOLICITED works & attempts to contact me.

  1. "Next time, you're speaking to me or any other guy, please start your mail with "sorry", or "thanks" ..."
    Let me remind you, you are also not my God to require me to send you sorrys or thanks For DOWNGRADES, INSULTS & Unsolicited works.

  2. I told you we were discussing about emls & not elm, how you named it in some windows of your addon once it's installed,
    & you respond with:

"Yess we're speaking of eml file's:
In this plugin, in the url of my github project, and in this url.
It's possibly your translator that turn some words in others"

You want screenshots or you can't still see the result of your xpi creation ? & what does it have to do with linguistic TRANSLATIONS ?

  1. Noone asked a button to open eml files, if you had taken the time to read this whole report at bugzilla, you wouldn't be
    contacting people & agressing them requesting money with your downgrades.

  2. Yesterday on github you were pretending that you couldn't add the x-unset tag yet because of the api, & your initial
    pretension was: i'll create a fix & make Plieser's extention as a webextention.

  3. review the name of your addon if that amuses you even though it does not interest me for anything, your buttons
    & egomaniac approach of the fixes, it's EML, not ELM. & one more thing, before posting an xpi at mozilla, try to make sure,
    your addon really saves emls & the x-unsent tag..

  4. To finish, i don't want your work, your downgrade as a new addon, nor have any interest in what you do & will never support
    your abusive approach to people requesting contributions by telling them you're not their whore & "are you gonna pay?" NOONE
    ever proposed you Money. & even though i'm extremely broke, i'd only give money after having shown sincere desire to help &
    having fixed all requests & never on demand & like a flammer. i owe you NOTHING, even less sorrys for your downgrades.

  5. For your info, the Christ was whipped 666 times, mr pgpgeek, aka gosparini, aka davehill666,
    I invite you to review your approach or go play elsewhere. unless you find a servant that gives a tos
    about your indirect approach of a downgrade & starts his letters by "Sorry", did you mean Sorry
    to interrupt you majesty ? I wasn't expecting a sincere fix since you pretended to convert Plieser's
    addon into a webextention, when it's already a WEBEXTENTION, Mr..

& let me remind you that my initial request by email involved the word "Contribution".

(In reply to Magnus Melin [:mkmelin] from comment #55)

I had the start of this at one time, so attaching it here in case someone
wants to continue. IIRC it works for some case, but there are many other
call sites that aren't covered.

... as in everywhere an .eml is opened through menus or double click, inside and outside of Thunderbird. I haven't looked where in the code all those would be.

I've rebased this and changed the following:

  • headers.get("from") added to the MailServices.compose.OpenComposeWindow() call. That selects the correct identity when opening the EML, or displays a notification when no suitable identity is found.
  • MsgOpenEMLFile(fp.file, fp.fileURL) with two parameters, avoids double URL processing.
  • Corrected URL to "chrome://messenger/content/messenger.xhtml" for Services.ww.openWindow() call, the messenger.xhtml was missing in the original patch, perhaps that's why it didn't work.
  • Removed XXX comment, IMHO unnecessary.

Tested opening EML from menu and with double-click on Windows desktop, with and without TB running. Both working. In order for that to work, TB needs to be installed as the default mail application, so mach build package.

If you asked me for review, it would be r=jorgk. Maybe you want to find another reviewer.

f? to ask whether you're OK with the changes. I'm really not sure which other code path are missing to open an EML file. If you let me know which action can also open an EML file, I'll look into it.

Attachment #9202664 - Flags: review+
Attachment #9202664 - Flags: feedback?(mkmelin+mozilla)
Attachment #9202664 - Attachment description: bug166541_x-unsent.patch (rebased go 2021) → bug166541_x-unsent.patch (rebased to 2021)
Comment on attachment 9202664 [details] [diff] [review]
bug166541_x-unsent.patch (rebased to 2021)

Review of attachment 9202664 [details] [diff] [review]:
-----------------------------------------------------------------

John wanted to take a look.
Attachment #9202664 - Flags: review?(john)
Attachment #9202664 - Flags: review+
Attachment #9202664 - Flags: feedback?(mkmelin+mozilla)
Assignee: nobody → john
Status: NEW → ASSIGNED
Attachment #9202664 - Attachment is obsolete: true
Attachment #9202664 - Flags: review?(john)
Attachment #8877281 - Attachment is obsolete: true
Target Milestone: --- → 92 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b64ff3e97a96
Open X-Unsent from command line and from UI for editing. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9230980 [details]
Bug 166541 - Open X-Unsent from command line and from UI for editing. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
X-Unset is ignored

Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
Low, as the patch is specifically designed to do nothing on fail.

Attachment #9230980 - Flags: approval-comm-beta?

Comment on attachment 9230980 [details]
Bug 166541 - Open X-Unsent from command line and from UI for editing. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9230980 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.