diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 8c084476..6caa834b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -643,6 +643,10 @@ "message": "Author", "description": "" }, + "placeholder_account_email_address": { + "message": "Account email address", + "description": "" + }, "prefs_OptionText_placeholders_use_default_value": { "message": "Placeholders: use default value", "description": "" diff --git a/js/mzta-placeholders.js b/js/mzta-placeholders.js index e2881cd0..09b881e0 100644 --- a/js/mzta-placeholders.js +++ b/js/mzta-placeholders.js @@ -32,7 +32,7 @@ */ -import { transformTagsLabels } from './mzta-utils.js'; +import { transformTagsLabels, getCurrentIdentity } from './mzta-utils.js'; const defaultPlaceholders = [ { @@ -67,14 +67,14 @@ const defaultPlaceholders = [ id: 'mail_folder_name', name: "__MSG_placeholder_folder_name__", default_value: "", - type: 0, + type: 1, is_default: "1", }, { id: 'mail_folder_path', name: "__MSG_placeholder_folder_path__", default_value: "", - type: 0, + type: 1, is_default: "1", }, { @@ -133,6 +133,13 @@ const defaultPlaceholders = [ type: 0, is_default: "1", }, + { + id: 'account_email_address', + name: "__MSG_placeholder_account_email_address__", + default_value: "", + type: 0, + is_default: "1", + }, { id: 'tags_current_email', name: "__MSG_placeholder_tags_current_email__", @@ -322,6 +329,10 @@ export const placeholdersUtils = { case 'current_datetime': finalSubs['current_datetime'] = new Date().toString(); break; + case 'account_email_address': + let current_identity = await getCurrentIdentity(curr_message, true); + finalSubs['account_email_address'] = current_identity.email; + break; case 'tags_current_email': let tags_current_email_array = await transformTagsLabels(curr_message.tags, tags_full_list[1]); finalSubs['tags_current_email'] = tags_current_email_array.join(", ");