Last active
March 6, 2018 08:52
-
-
Save nmccready/5217222 to your computer and use it in GitHub Desktop.
Cool way to send email via Scala executing bash / shell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys.process._ | |
val body = "junk email body" | |
val subject = "test email subject" | |
val commaDelimitedEmails = "test1@gmail.com,test2@gmail.com" | |
//goal is to execute the same bash command without loading a file | |
//script would be identical to: echo body | mail -s subject addresses | |
Seq("echo", body) #| Seq("mail", "-s %s".format(subject), commaDelimitedEmails) ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment