User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 423,653 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,129 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums

Sending email from a shell script

Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Rep Power: 11
Solved Threads: 102
Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Sending email from a shell script

  #2  
Dec 8th, 2004
What's the script? (be sure to edit out the email addresses)

I usually just use sendmail directly, like this:

sendmail email@domain.com < ~/maildir/mailmessage

and that works out just fine, never had a problem. You could even use a variable if you wanted:

sendmail $email_addy < ~/maildir/mailmessage

That's always worked for me, assuming that your MTA is sendmail, or it is at least available.
Alex Cavnar, aka alc6379
Reply With Quote  
All times are GMT -4. The time now is 10:46 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC