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 ###
from=email@gmail.com
to=$(tail -n1 <<<"$to")
server=smtp.gmail.com
port=587
ssl=true
username=email@gmail.com
password=XXXXX

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, 7 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.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098