FTP script error

Some subtle changes I would suggest.
Remove "prompt".
Change "mput" to "put". We are only transferring one file in each invocation of ftp.
Because each line in /name1/name2/${LOGFILE}.log is a full pathname we need to extract the filename without the pathname to use for the destination filename (which is going to a different directory name).
Issue a "lcd" such that the ftp starts in the same directory as the source file. You already have "cd" to the destination directory. We can then issue "put filename" without mentioning directory names on the "put" line.

# Upload to ftp  -  ftp.log  - all ftp messages 
while read line
do
#
FILENAME="`basename ${line}`"      # Name of file without directory
DIRS="`dirname ${line}`"           # Name of source directory
#  
ftp -v -n $HOST > /name1/name2/name4/ftp.log <<EOF 
user ${FTPUSER}
pass ${PASSWD}
lcd ${DIRS}
cd name11
cd name12
bin 
put ${FILENAME} 
bye
EOF 
done </name1/name2/${LOGFILE}.log

Thank you methyl !
I did what you have suggested and the script look OK now.