fixed bug in send_email which was erroring on getdate in sql