Added email and SMS actions. Credit to Jimmy Leahy for original code.