Subject line missing while sending mail

Hi,

I have below script

PROJECT_NAME=UDL/UDL_Weekly
sub= echo ${PROJECT_NAME}|cut -d "/" -f2
cat pr.sh|mail -s "`hostname`: $sub failed" sonu.pal@xyz.com


While running the script I am receiving the subject line in mail as " podetlsapp01: failed' instead of " podetlsapp01: UDL_Weekly failed "

Can anybody help me on that..

$ sub=`echo ${PROJECT_NAME}|cut -d "/" -f2`