Ask HN: Free,reliable SMTP service for sending emails from cron jobs in Mac OS X
I usually have several cron jobs running in the background that output their results to text files. I then have to remember to check these files regularly. I figured it would be more productive to just send these to my e-mail.
I use Mac OS X, and I found ways to set up Gmail so that I can use the command-line `mail` client (http://www.anujgakhar.com/2011/12/09/using-macosx-lion-command-line-mail-with-gmail-as-smtp/). But all of these require me writing my Google password in cleartext (?!).
Do you know of a free service that I can set up for this purpose? Since I would only use it for piping the output of these cron jobs, I wouldn't mind writing the pass in cleartext.
I figured I could open up a Gmail account just for this purpose, but that somehow feels like a bit of a hack..
8 comments
[ 4.8 ms ] story [ 28.9 ms ] threadYou can use traditional SMTP commands or use their API and it's free for up to 12,000 emails per month
https://mandrill.com/
Otherwise you could just send through a gmail account as well if it's not going to be that many of them.
Given that MacOS already ships with Tcl/Tk, if you install TclLib (http://wiki.tcl.tk/1246) such that the native Tcl/Tk can find it (note, I have no Mac, so I have no knowledge of 'how' to install TclLib on MacOS) then you need a four line Tcl script to create a replacement "sendmail" command:
Replace 'smtp.server.name.com', 'this.machines.name.com', 'email@address.to.use.as.from.com', and 'destination@email.address.com' with the appropriate items for your environment and you (on Linux, at least) will be good to go. Hopefully MacOS's cron is not too far afield from standard Unix cron.But my main answer was in finding an SMTP service that can send emails. In your example, don't you have to log in to smtp.server.name? If so, don't you need to put a password somewhere in that tcl script?
It's not an SMTP server, but translates between REST calls and SMTP/IMAP commands (as far as I understand). So they store my Google credentials on their server, I keep an API key in cleartext, and use their infrastructure to both send and look at e-mails..
Anybody has experience with this?