Sometimes one need to send an email from Linux (automated messages, warnings and so on). The problem is that the content looks strange when received by the email clients. The issue could be related to character encoding and UTF8. Here is a php script I used to send an email with the correct character encoding.

The unix ‘mutt’ command can be used to send an email with attachment: mutt -s “Test message” name@something -a files.tar < message.txt where files.tar is the attached file, and message.txt is the file containing the message. Subject to the email is added with the -s option. In this case: -s “Test message” name@something is the