
Show HN: Postman – A command-line utility for batch-sending email - zachlatta
https://github.com/zachlatta/postman
======
voltagex_
Name collision with [http://www.getpostman.com/](http://www.getpostman.com/)

~~~
zachlatta
Ah, didn't realize. Any new name suggestions?

~~~
yeukhon
I prefer simple names like postal or mailer.

~~~
voltagex_
gopostal!

~~~
yeukhon
What about postalgusta as in megusta?

------
a3_nm
I'd change the example to reflect a more realistic use case: mails sent by
Wowbagger the Infinitely Prolonged
[https://en.wikipedia.org/wiki/List_of_minor_The_Hitchhiker%2...](https://en.wikipedia.org/wiki/List_of_minor_The_Hitchhiker%27s_Guide_to_the_Galaxy_characters#Wowbagger.2C_the_Infinitely_Prolonged),
with name/insult pairs.

------
616c
And for the purists among us, the GNU Mailutils package.

[http://mailutils.org/](http://mailutils.org/)

------
koralatov
This looks really, really useful, and easy to use.

One feature-request: a flag to include an attachment. It's probably an edge-
case, but I've recently taken over running an account that needs to send out a
PDF of the organisations new programme about once per quarter. This would be
the ideal tool for that, if I could include an attachment.

------
bdamos
Cool! For a slightly different scenario, do you think there's a clean way to
use postman to manage larger bulk emails with similar and different paragraphs
other than trying to edit paragraphs in CSV? Sometimes I use my small project
([https://github.com/bamos/yaml-mailer](https://github.com/bamos/yaml-mailer))
to bulk email 10s of people with more personalization in each message, and I'd
be happy to switch if a cleaner solution exists.

Example scenario: I applied to PhD programs ~5-6 month ago and liked to send
emails to faculty members at each school I applied to telling them I was
interested in their work by sending nearly the same email to everybody with a
slightly different portion for their work.

~~~
zachlatta
Hmm, what if you could specify file names as a field in a row and have them
automatically read and injected as the field?

\--

Example:

I have the following CSV:

    
    
        Name,Email,Message
        Jane Doe,jane@janedoe.com,janedoe.txt
        John Doe,john@johndoe.com,Hello!
    

And the following template:

    
    
        Hello {{.Name}}! {{.Message}}
    

`janedoe.txt` reads:

    
    
        The weather is nice outside!
    

Generated output:

    
    
        Hello Jane Doe! The weather is nice outside!
    
        Hello John Doe! Hello!
    

\--

Would that satisfy your use case?

------
jwcrux
Neat! Shamelessly, I'd like to mention that you may also consider using the
email ([https://github.com/jordan-wright/email](https://github.com/jordan-
wright/email)) package I wrote to serve your backend. I've worked to make it
as simple and robust as possible. However, if you're happy with gophermail, by
all means use it! Both are great packages, imo.

~~~
zachlatta
Thanks for the recommendation! I've updated postman to use your package.

Edit: Hmm, I ran into an issue with the MIME type in my mail client (sup).
I'll look into it, but have reverted the commit in the meantime.

~~~
jwcrux
I appreciate you giving it a shot. If the issue is with my package, please
don't hesitate to let me know and I'll jump on it ASAP. Happy to help any way
I can!

------
joshmlewis
So a friend and I built something very similar that hooked up to Mailgun and
had a GUI interface. Spinning up instances of these for clients proved very
lucrative for their, ahem, legitimate email purposes. The cool thing about
integrating with Mailgun is easy setup and you get analytics that are useful
for a/b testing and other things.

------
krrishd
This is awesome! I'm loving all the new services/software that allow
programmatic handling of email, I feel like that's one place where abstraction
really helps.

------
feralmoan
why this over a cat | sed | sendmail < bcc distro_list?

~~~
zachlatta
* Both text and HTML parts

* All of the power of templates in Go (conditionals, etc)

* Some SMTP providers will complain if there are too many emails in BCC (generally >1000)

* Sends emails concurrently

~~~
peterwwillis
Can you put this in your README?

Side question: says the tool is meant to send "html emails"; can it not also
just do string replacement in any composed mail message, like a multiple MIME-
part mail message that's composed by some other tool?

~~~
zachlatta
Right now it only explicitly supports HTML and text emails because it composes
the multipart MIME message itself. Pull requests are welcome!

