Mailbox shows the sender name as "Apache", because the mail I am autosending is being sent from a Perl CGI program. How do I change it to something else?
You just need to add a From:
header. By default there is none.
echo "Test" | mail -a "From: Someone <[email protected]>" [email protected]
You can add any custom headers using -a
:
echo "Test" | mail -a "From: Someone <[email protected]>" \
-a "Subject: This is a test" \
-a "X-Custom-Header: yes" [email protected]