A while back I tried to send an email from my app by calling an apple script. This worked well for a while, but since Apple Mail version 16.0 my message is always sent as "citation". So, in the style as if my original message was a message I replied to.
This means that instead of having a message body saying "Hi you", the message generated by Apple Mail is "> Hi you".
Does anyone here have similar issues? I filed a bug report (FB11734014) a year ago but it is still in "Open" and I am starting to wonder if AppleScript is still officially supported/taken serious by Apple?! Is there any other, recommended way of how to easily send an email from one's app?
Thanks!
The apple script that I use:
tell application "Mail"
set this_message to make new outgoing message at beginning of every outgoing message
set content of this_message to "This is the body of the message"
tell this_message
make new to recipient at beginning of every to recipient ¬
with properties {address:"test@example.com"}
end tell
set subject of this_message to "The subject"
send this_message
end tell
The email this generates looks like this:
--Apple-Mail=_ADD491E8-EDEC-45CB-9F44-EF266087DB84
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
> This is the body of the message
--Apple-Mail=_ADD491E8-EDEC-45CB-9F44-EF266087DB84
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class="Apple-Mail-URLShareUserContentTopClass"><br></div><div class="Apple-Mail-URLShareWrapperClass" style="position: relative !important;"><blockquote type="cite" style="border-left-style: none; color: inherit; padding: inherit; margin: inherit;">
This is the body of the message
</blockquote></div></body></html>
--Apple-Mail=_ADD491E8-EDEC-45CB-9F44-EF266087DB84--