Send email if script outputs string

I found this line:

sh | grep 'NO' 2>&1 > grep.log && /usr/bin/mail -s "grep found something" < grep.log 

which will write the output of to grep.log and then email that to an email

Is there anyway to remove the part where this wrote to grep.log and simply mail the output of the script without having to write it to a file?