Sending email from a script & specifying the "from" address

view story

http://www.unix.com – Hello all, I have a requirement to send an email from a shell script. Simple enough. A google search gives thousands of examples. But here's the catch. I need to be able to specify the "from" address, and none of the examples I've found allow for that. When I used the mail or mailx commands, the email goes out just fine, but it comes from [email protected] I need the "from" address to be [email protected] I could write an Expect script that telnets to the SMTP server on port 25 and issues the relevant commands, but I feel like there must be a simpler solu (HowTos)