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
I’ve wrote a simple bash script to dump databases from a Postgresql 8.1 database server which uses the pg_dump and pg_dumpall. #!/bin/bash ## This scripts dumps all the databases in a Postgres 8.1 server, localhost ## 2 dump files are made for each database. One with Inserts another without. ## some variables, change them to