Logging sent messages to Org Mode with message-sent-hook https://sachachua.com/blog/2022/11/logging-sent-messages-to-org-mode-with-message-sent-hook/
You can programmatically add notes to Org logbooks by setting markers
and creating a temporary buffer, and you can add stuff to
message-sent-hook so that a note gets saved after you send an e-mail.