[CODE] Send email/growl/etc notifications

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

[CODE] Send email/growl/etc notifications

Post by rednoah »

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