Config Pronterface to send emails when job is done

I made a thing!

We’ve always had our printers near our computers, but we’ve got them running near 24/7 and the noise is… slowly driving me insane.

I wanted to move them into the basement, but the girlfriend insisted we had a way to know when a print had finished (besides a webcam).

Pronterface ( has an option to run a command when a print is finished, and I’ve piggybacked on this to send an email when the print is finished. Here’s how to do it:

On Pronterface, Settings -> Options -> External Commands (tab) -> Final Command
We launch Chrome with some command line arguments (but this can be any browser you’d like that accepts arguments):
C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe (your URL)

I made a really simple service that accepts an email address and note and sends an email (please don’t abuse this - it’s open for free use for now): just finished!

This service takes a “To” email and a subject and sends off a simple email. It’s not logging your address, it’s not putting you on a mailing list. I ensure you this is a dozen lines of code and an innocent service.

SO! Line for Pronterface is:
C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe YOUR EMAIL HERE)&note=(WHAT YOU’D LIKE YOUR SUMMARY TO BE)

When your print is done, a chrome window will pop up (with a plug for our shop) and you’ll get an email.

More importantly, I can put the printer in the basement and the girlfriend stays happy :slight_smile:

Nice idea, SOX, and definitely a needed function. May I add my thoughts? You might already know these things, so my apologies in advance if this is all old news to you :smiley:.

If Pronterface can start a command like the chrome browser’s command-line engine, could you convert the service code-behind to a locally-run command-line executable that does the SMTP send to a user-configured mail system of their choice? That way there’d be no need for a private Web service at all. Since you clearly know something about ASP, I’d say just write a C# (or C++) or PHP or any other script/language that has an email-sending library. Though PHP is typically run as part of a web server, it also functions perfectly well as an on-machine scripting engine.

In the link you’re using in your program, you can also include the $body parameter to set an actual message body. Things like < and > and & and " all have to be escaped. Here’s some good information on doing that:

Did you know you can send text messages to someone’s phone from a program/Web service? Yeah, just send the text as email to @ so like Sometimes finding that carrier host name can be more difficult than it need be, but not impossible :smiley:. As long as the sender is a valid email address, the carrier typically accepts the text message, since anonymous incoming texts are what SMS is all about. I know there’s a way to also send pictures with those text messages, but I’ve never had to do it. My guess is MIME and encoding is required. Not that difficult if you’re familiar with MIME message structure.

Anyway, sending out notices of (presumed) completed prints would be cool. Though with my (lack of) printing success so far, I’d come to dread those emails :wink:


Thom Randolph