Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendmail command

 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone give me simple example of using sendmail command..just plain text email...Do i need to do any settings for that....
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
echo "Can you hear me now?" | mail -s "Test message" friend@wherever.com

The only tricky part is that the body comes from stdin (hence the echo to pipe).
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic