The example below is presented in a form that I have been using for several years. And basically, this is a well-known method of sending emails using Applescript.
tell application "Mail" set newMessage to make new outgoing message with properties {subject:"IP Address", content:"Your IP Address Is: 86.195.132.134"} tell newMessage set visible to false set sender to " mark@sender.com " make new to recipient at end of to recipients with properties {address:" recipient@mac.com "} send end tell end tell
What I just noticed today is the 'sender' email installed in the script, maybe not one Mail.app if its mailbox is not selected. Random will be used if the main mailbox is selected or an individual mailbox is selected, then the address from his account will be used.
I think this is due to the fact that in the Mail settings in the Composing section. There is the option "Send new messages from:"

You cannot select "NO". The only options are "Select selected mailbox" or one of the email addresses that are in the drop-down list.
I must admit, I do not know if this was before I went to Leo.
Does anyone know about this, or if it is a known bug?
Thanks.
source share