MelvinProject wrote:StackOverflow has said otherwise.
Then you rather wasted people's time asking the question simultaneously in two places, without disclosing that.
There is not really a disagreement because a here document, like any redirection, requires you to specify exactly which lines of input go to which program. It is not like typing your script interactively.
The redirection into ftp does not allow for any error checking. Unlike using expect, you cannot be sure if the upload has succeeded.
Anyway, the best tools for automated transfers using FTP or HTTP, are the likes of curl and wget.