Closed Bug 1653540 Opened 4 years ago Closed 3 years ago

Implement API to add custom mail headers

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1749198

People

(Reporter: tri-check, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

We need functions to add custom headers (eg. X-Info) to outgoing mails.

Old code was:
gMsgCompose.compFields.setHeader("X-Info","blabla");

Actual results:

https://thunderbird-webextensions.readthedocs.io/en/latest/compose.html#compose-composedetails

Function to add header is missing.

Expected results:

Add function for adding custom headers.

Indeed. Confirming per documentation. Assuming that the documentation cited is correct and complete, add-ons can no longer add custom headers, which looks like an important missing part of compose API. We should implement this ASAP.

Wayne, could you add an API developer for more input?

Status: UNCONFIRMED → NEW
Component: Untriaged → Add-Ons: Extensions API
Ever confirmed: true
Flags: needinfo?(vseerror)
Priority: -- → P3
Summary: Possibility to add own mail headers → Implement API to add custom mail headers

(In reply to Thomas D. from comment #1)

Indeed. Confirming per documentation. Assuming that the documentation cited is correct and complete, add-ons can no longer add custom headers, which looks like an important missing part of compose API. We should implement this ASAP.

Extension authors can already use WebExtension experiments to create their own APIs, even if temporary. There's many APIs that should be implemented, not all of them can be high priority.

WebExtension authors are also quite welcome to propose their own APIs or extension of APIs, and offer code if they desire.

Wayne, could you add an API developer for more input?

I'm pretty sure the relevant people will already be watching this component.

Flags: needinfo?(vseerror)
Attached file schema.json (obsolete) (deleted) —
I implemented an experimental API to handle message headers: ``` ```
Attached file schema.json (deleted) —
Attachment #9183144 - Attachment is obsolete: true
Attached file implementation.js (deleted) —

I implemented an experimental API to handle message headers:

You need to add

  "experiment_apis": {
    "composeMessageHeaders": {
      "schema": "api/compose_message_headers/schema.json",
      "parent": {
        "scopes": [
          "addon_parent"
        ],
        "paths": [
          [
            "composeMessageHeaders"
          ]
        ],
        "script": "api/compose_message_headers/implementation.js"
      }
    }
  },

into your manifest.json

We should limit this to headers starting with X-, should we not?

I think this bug can be closed, because the requested functionality should now be supported by Thunderbird 100+, see bug 1749198.

Thanks Alexander!

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: