Module: Mailmate::CLI::Draft Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
‘mm-draft` — identical to `mm-send` but guaranteed never to actually send. It refuses `–send-now` with a nonzero exit, so a “compose this but don’t send it” instruction can’t be silently defeated by the flag that flips ‘emate mailto` from draft-pause to send. Without `–send-now` both commands behave identically (open a draft window in MailMate); the only difference is that mm-draft cannot be talked into sending.
Constant Summary collapse
- NOTE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
<<~NOTE mm-draft — same as `mm-send`, but it only ever opens a draft and refuses `--send-now`. Use `mm-send` when you actually want to send. All other flags pass through to `emate mailto` exactly as in mm-send (its help follows below). NOTE
Instance Method Summary collapse
-
#run(argv) ⇒ Object
private
Returns the exit status.
Instance Method Details
#run(argv) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the exit status. Refuses ‘–send-now` (exit 2); otherwise delegates verbatim to `Mailmate::CLI::Send`.
27 28 29 30 31 32 33 34 |
# File 'lib/mailmate/cli/draft.rb', line 27 def run(argv) if argv.include?("--send-now") warn "mm-draft: refusing --send-now — mm-draft only ever creates drafts. Use mm-send to send." return 2 end warn NOTE if argv.include?("--help") || argv.include?("-h") Send.run(argv) end |