Adding email send with insert action (nextval in postgresql