Textmate Email Bundle customization - coding help?

Is there a way to customize the awesome Textmate Email Bundle so that, instead of prompting me for an email address, when I run the command it sends my email directly to a pre-set email address (or list of email addresses)?

The current code:

to=$(CocoaDialog inputbox --title "Send an email to..." \
    --informative-text "Who should I email?" \
    --button1 "Make it so ☛" --button2 "Cancel")
[[ $(head -n1 <<<"$to") == "2" ]] && exit_discard

### Setup your mailing options ###
to=$(tail -n1 <<<"$to")

It seems I would need to swap out the "to=" line for something else, but I don't understand the code well enough.  If I just substiture an email in that space it doesn't work...

bparizek, 8 years ago

ok, I figured out half of this.  If I insert the --text line below, I am prompted with a pre-populated field for sending one email, and can just hit send:

--title "Send an email to..." \
--text "email@gmail.com" \
--informative-text "Who should I email?" \

Now, is there a way I can send multiple emails?  I'm not finding much in my searches.  I've tried stringing emails together with a comma, but that doesn't seem to work.  tries to send the email to the whole string.  I've read a few things that suggest I need to add multiple "to" headers, but all my guesses to what that might mean aren't resulting in much.

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free