REPLY TO address in Mail?

(1) In Catalina the application “Mail” has a new location.

It was at (path to applications folder as string) &“Mail.app”

“SSD 1000:Applications:Mail.app:”

Under Catalina, it’s at
“SSD 1000:System:Applications:Mail.app:”
So I tried to edit the instruction building the wanted path using :
(path to applications folder from system domain as string) &“Mail.app”
and, what a mess, I got “SSD 1000:Applications:Mail.app:” too.

I made a complementary check running the simple:
path to applications folder from system domain
and got the awful : “SSD 1000:Applications:” too

To get the correct path I must use :
(path to library folder from system domain as string) &“Applications:”

There is a smell of bug here, or maybe it’s just a behavior which I never faced.

Happily, as Mail is a standard application the instruction (path to application “Mail” as string) return the correct “SSD 1000:System:Applications:Mail.app:”.
So I edited the script in message #15 with this syntax.

(2) For the 1st script in message #15, it was my fault.
When I posted in a hurry, I forgot to edit the name of the table from which the wanted was supposed to be grabbed. I saw that quickly but you had already ran the script. It was corrected since.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche 31 mai 2020 15:00:17

Sir, you never cease to amaze me with your in-depth knowledge of all this. Many thanks for the time you have devoted to my problem. I’m not quite done yet, unfortunately. The code

set x to "KG0-Fs-IxZ.title"
   set loc to localized string x from table "ComposeViewController"
   if (loc = "KG0-Fs-IxZ.title") and (sys2 < 14) and liveLocaleShort = "en" then
       set loc to "Reply To:" -- for 10.13.6
   end if
   set reply_loc to loc

results in the value of reply_loc to be “KG0-Fs-IxZ.title”, which obviously produces an error when applied in the email setup line that uses it. I don’t know if you have updated that code and the change isn’t visible to me yet.

I tried

set value of text field “Reply To:” of window 1 to theReplyToAddress

(i.e. ignoring reply_loc) and it worked perfectly, but that might not be the ‘proper’ way to do it as your original premise was to discover the correct name automatically. However, it might not matter as this application will always be run in the English language and it’s unlikely that the “Reply To:” text will ever change. Or are those dangerous assumptions?

I’d appreciate your comments.

I’m also amazed at how Apple can just change things like this from OS release to OS release and apparently just leave it to people like you to discover the differences. Backwards compatibility doesn’t seem to be in their lexicon.

In the set of datas which I grabbed, I found a curious feature.
In Mail resources, the table “ComposeViewController.strings” isn’t available but there are two tables :
“ComposeViewControllerWK1.strings”
“ComposeViewControllerWK2.strings”
which appear to have the same content.
I wonder if it was a temporary setting or if is the same in 10.15.5.

May you tell me what is returned by this short script :

set root to (path to application "Mail" as string) & "Contents:Resources:it.lproj:ComposeViewController"

tell application "Finder"
	set maybe0 to exists file (root & ".strings")
	set maybe1 to exists file (root & "WK1.strings")
	set maybe2 to exists file (root & "WK2.strings")
end tell

{maybe0, maybe1, maybe2}

According to my set of datas it would return :
{false, true, true}

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 1 juin 2020 12:34:57

It returns {false, true, true}

Thank you.
My datas are OK.
I really don’t understand what’s the need for the two files.
I compared the two for some languages and found no difference.
Don’t waste time searching for the English version (in the folder en.lproj), there is no such file as for a lot of other ones.

In fact, when both files exists, they are identical.
I don’t know why, for Greek (el.lproj), only “ComposeViewControllerWK2.strings” exists.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 1 juin 2020 15:22:57

Thanks again.

Your new code

set x to "KG0-Fs-IxZ.title"
   if sys2 < 15 then
       set loc to localized string x from table "ComposeViewController"
   else
       set loc to localized string x from table "ComposeViewControllerWK2"
   end if
   if (loc = "KG0-Fs-IxZ.title") and (sys2 < 14) and liveLocaleShort = "en" then
       set loc to "Reply To:" -- for 10.13.6
   end if
   set reply_loc to loc

produces the value “Reply To:” in reply_loc and the end result is now as expected.

I think we can call this one closed now and I sincerely thank you for all the time and effort you have devoted to this.