I followed the following guide on how to setup sendmail to use a remote SMTP server and authenticate: https://www.smtp2go.com/docs/sendmail/
However, sendmail shows that it sends emails out, but debug shows that it connects to localhost and not the remote host.
I execute the following command to send emails:
sendmail -X sendmail_log -firstname.lastname@example.org email@example.com < /tmp/email.txt
My host 'host1.com' does only allow emails sent from 'firstname.lastname@example.org'.
Subject: Terminal Email Send Email Content line 1 Email Content line 2
This is where in the log file localhost is used:
07460 <<< Subject: Terminal Email Send 07460 <<< 07460 <<< Email Content line 1 07460 <<< Email Content line 2 07460 <<< [EOF] 07460 === CONNECT [127.0.0.1]