You did. The only reason it didn't work is because you sent the email to your own computer but targetting a Gmail account. At best Exim relayed it to Gmail which promptly discarded it because you basically tried to spoof the mail as coming from Gmail. It failed every possible email security/validity checks: SPF, DKIM, DMARC, you failed all 3.
Your best bet to send an email with a shell script and telnet is to connect to Gmail's submission on port 587, authenticate then send the mail. Since it came in proper this time around, it'll be delivered correctly.
Or you can configure your exim server to do that properly for you so that you can just use sendmail from your script and let Exim deal with all the authentication and delivery.