Reading list of files into ftp script

How can I go about getting this done? I have tried and failed with a loop before I start the session and after seeing that I am already in the ftp code block and not bash when I am trying to perform this:

#FTP Information
ftp_server=xx.xxx.xxx.xx
ftp_user=xxxx

while read line; do "$file"; done < <(cat filename.txt)

#Start FTP session

ftp -v -n <<EOF
open $ftp_server
user "$ftp_user"
sleep 1

#change to the correct directory
cd /<directory>/<directory>
#change to binary transfer mode
bin
prompt
mget $line
bye
EOF

Help!

#FTP Information 
ftp_server=xx.xxx.xxx.xx 
ftp_user=xxxx 

while read line
do
#Start FTP session 
ftp -v -n  <<EOF 
open $ftp_server 
user "$ftp_user" 
#change to the correct directory 
cd /<directory>/<directory> 
#change to binary transfer mode 
bin 
prompt 
mget $line 
bye
EOF 

done <filename.txt