Я пытаюсь отправить письмо, используя скрипт Apple. Все работает нормально, даже электронная почта отправляется на адрес, указанный в скрипте. Моя проблема в том, что я не могу добавить подпись в содержании электронной почты. Вот код
tell application "Mail"
set theSubject to "Subject if the testing email" -- the subject
set theContent to "Body of the email goes here" -- the content
set theAddress to "test123@gmail.com" -- the receiver address
set theSignatureName to "Charu" -- the signature name
set msg to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
set message signature of msg to signature theSignatureName
send msg
end tell
Когда я пытаюсь запустить это, я получаю предупреждение об ошибке, которое говорит Mail got an error: AppleEvent handler failed.
Я не уверен, как установить подпись.
Заранее спасибо