您應該發佈您擁有的代碼......太多問題仍然能夠可靠地回答你。你想要發送給電子郵件的是什麼?電子郵件阿迪?學科?身體? 基本上,您捕獲對話框的結果,然後將其放入「mailto:」URL字符串中,然後使用URL上的「打開位置」。這應該足以讓你開始:
set dialogResult to display dialog "Enter the subject" default answer "My subject" buttons {"[email protected]", "[email protected]"} default button 1
set theAddress to button returned of dialogResult
set theSubject to text returned of dialogResult
set theBody to "This%20is%20the%20body%20text:%0AMore%20text"
-- Must encode entities, spaces as %20 and line breaks as %0A (%0D%0A), etc.
set theSubject to findReplace(" ", "%20", theSubject)
set theSubject to findReplace(return, "%0A", theSubject)
set theURL to "mailto:" & theAddress & "?subject=" & theSubject & "&body=" & theBody
open location theURL
on findReplace(f, r, s)
set otid to AppleScript's text item delimiters
set AppleScript's text item delimiters to f
set s to text items of s
set AppleScript's text item delimiters to r
set s to s as string
set AppleScript's text item delimiters to otid
return s
end findReplace