MozillaZine

Email composition element IDs?

User Help for Mozilla Thunderbird
oengland
New Member
 
Posts: 1
Joined: June 14th, 2020, 8:38 am

Post Posted June 14th, 2020, 8:43 am

Hey everyoneNew to the forum, so sorry if this is in the wrong place. I'm writing a script for the QuickText extension to fill in the TO field when composing a new email, but I don't know what the element ID for the TO field is to point the script in the right direction to fill. Does anyone know that could help out?

Thank you!

morat
 
Posts: 3782
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 14th, 2020, 1:22 pm

How to add a recipient using the error console.

Code: Select all
(function () {
  var win = Services.wm.getMostRecentWindow("msgcompose");
  win.awAddRecipientsArray("addr_to", ["foo bar <test@invalid.com>"]);
  win.awDeleteRow(win.MAX_RECIPIENTS);
})();

How to add a recipient using a script.

Code: Select all
var win = this.mWindow;
win.awAddRecipientsArray("addr_to", ["foo bar <test@invalid.com>"]);
win.awDeleteRow(win.MAX_RECIPIENTS);

Quicktext
http://addons.thunderbird.net/thunderbird/addon/640
http://github.com/jobisoft/quicktext/wiki

Reference
http://searchfox.org/comm-esr68/search?q=awAddRecipientsArray

WaltS48

User avatar
 
Posts: 4290
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted June 14th, 2020, 3:29 pm

oengland wrote:Hey everyoneNew to the forum, so sorry if this is in the wrong place. I'm writing a script for the QuickText extension to fill in the TO field when composing a new email, but I don't know what the element ID for the TO field is to point the script in the right direction to fill. Does anyone know that could help out?

Thank you!


Add-on development discussion is here.

https://thunderbird.topicbox.com/groups/addons
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

morat
 
Posts: 3782
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 14th, 2020, 6:52 pm

How to add a recipient using a template.

Code: Select all
[[HEADER=to|foo bar <test@invalid.com>]]

HEADER tag
http://github.com/jobisoft/quicktext/wiki/List-of-all-supported-tags#header

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 6 guests