I use this command to send a logfile with Thunderbird:
thunderbird -compose "subject='test',to='test@mail.test',body=$output,attachment='/home/test/scan.log'"
That launches and shows Thunderbird's prefilled edit-message-window and I have to press the Send button manually.
How can I send email automatically?