Browse the docs

mailDateSent

Returns when the selected message was sent, as a time in seconds since 1 January 1970.

Keyboard Maestro: MAILDATESENT

Details #

mailDateSent() takes no arguments and returns a number: when the selected message was sent, as a time in seconds since 1 January 1970.

Parameters #

Takes 0 arguments. {{ mailDateSent() }}

Examples #

mailDateSent()
→ 0
kmDateTime("yyyy-MM-dd HH:mm", "for", mailDateSent())
→ 1969-12-31 18:00

Gotchas #

  • Needs Automation permission for Mail. It reads the first selected message in Mail; when Mail isn't running, nothing is selected or Mail doesn't answer within about 5 seconds, the answer is 0.

  • The time is a number: format it with kmDateTime using the "for" mode, for example kmDateTime("yyyy-MM-dd", "for", mailDateSent()).

  • Takes no arguments.