Send Format LDAP Technical Documentation

De Trustedbird Client Wiki
English | Français

> Documentation > Add-on: Send Format LDAP > Technical Documentation


There is an open bug at Mozilla for this subject: Bug 375833.


Synthetic presentation of the architecture of the extension

This functionality is developed in the form of a Thunderbird extension.


The heart of this implementation is mainly to complete the existing function to seek supported email formats for the recipients in the LDAP directory.

GUI files

The goal of the overlay XUL file messengercompose_overlay.xul is only to include the library send_format_ldap.js to the message composition window. This is this library that allows to redefine the built-in function DetermineHTMLAction(convertible) in order to complete her by adding searching on LDAP. First, this function checks the supported email formats on the local address, then if there are undefined formats, it opens a new window, defined by the XUL file formatFetchingStatus.xul , which handles the right LDAP search.

This search mechanism is mainly the same as the built-in one that seek recipients certificates (Built-in files certFetchingStatus.xul and certFetchingStatus.js)

The property, defining the boolean LDAP attribut to look for, is a standard Thunderbird property named: ldap_2.servers.default.attrmap.PreferMailFormat. By default, this property has the value mozillaUseHtmlMail,xmozillausehtmlmail. These attributes are defined by the Mozilla LDAP Address Book schema. So, it is possible to configure the attributes to look for by defining values of this property.

SendFormatLdap property en.gif

SendFormatLdap fetch en.gif

XPCOM files

This extension doesn't provided any new XPCOM. Mainly, it uses the built-in XPCOM nsILDAPOperation with its method searchExt that allows to execute LDAP operations.