How do triggered emails work?