Mac从邮件中提取HTML

问题描述 投票:0回答:1

我试图使用HTML从电子邮件中提取AppleScript。我遇到了这个StackExchange帖子 - Mac Automator/Applescript(?) to extract URL's from Mail messages--它试图从电子邮件内容中提取URL。提取代码是:

on run {input, parameters}
    set mailContentList to {}
    tell application "Mail"
        repeat with selectedMail in input
            set end of mailContentList to content of selectedMail
        end repeat
    end tell
    return mailContentList
end run

这只提取visible内容,而不是整个HTML内容。我尝试在with properties {visible:false}之后添加content然后在input之后添加没有运气。

html macos email applescript automator
1个回答
1
投票

你得到了source属性的原始来源

set end of mailContentList to source of selectedMail

但你必须“手动”提取HTML部分。

© www.soinside.com 2019 - 2024. All rights reserved.