I use this to start a HEREDOC, type the text and finish up by placing a single dot in the last line:
mutt -s "foo" -- [email protected] << .
The same from within a script will fail due to syntax error.
(sh/zsh/... are expecting to provide the entire HEREDOC within the script itself.)
How can I achieve the desired effect regardless?