sending email in case of file not found

Hi,
In the shell script, i want to do sftp and go to a directory and check if a particular file is present, if not i send an email with some error message. Please guide me about how i could achieve it...."

#!/bin/bash
if [ ! -s sftp_filename ]
then
        echo "File not exists" | mailx -s "FTP File Not found" abc@xyz.com
else
        echo "File exists"
        <<SFTP CODE>>
fi