Skip to content

Instantly share code, notes, and snippets.

@okhiroyuki
Created December 10, 2011 00:02
Show Gist options
  • Save okhiroyuki/1453907 to your computer and use it in GitHub Desktop.
Save okhiroyuki/1453907 to your computer and use it in GitHub Desktop.
Send Mail HatenaDialy From MarsEdit
set myfrom to "****@example.com" -- 自分のメールアドレス
set hatenato to "****@d.hatena.ne.jp" -- 送信先メールアドレス
tell application "MarsEdit"
tell document 1
set tit to get title
set cont to get body
set cont to cont & (get extended entry)
end tell
end tell
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:tit, sender:myfrom, content:cont}
tell newMessage
set visible to false –サイレントでメール作成(メールのウィンドウを表示しない)
make new to recipient at end of to recipients with properties {address:hatenato}
send
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment