[CODE] Send email/growl/etc notifications

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
The Source
Posts: 18390
Joined: 16 Nov 2011, 08:59
Location: Taipei

[CODE] Send email/growl/etc notifications

Post by rednoah » 01 Jun 2012, 02:52

The easiest way to send notifications, e.g. about renamed/moved files, is to call external programs.

sendmail for sending email
growlnotify to sending growl notifications
eventcreate for creating windows event log entries

e.g. using an external program to send email:

Code: Select all

def paths = rename(...)
paths.each {
	def msg = "${it.name} has been added to the library"
	execute("sendemail.exe", "-f", "FROM EMAIL ADDRESS", "-t", "TO EMAIL ADDRESS", "-s", "SMTP SERVER:PORT", "-xu", "SMTP USERNAME", "-xp", "SMTP PASSWORD", "-u", msg, "-m", msg)
:idea: Please read the FAQ and How to Request Help.

Post Reply