Tech Tip! - Sending Email using Sendmail

Sendmail is a popular SMTP server for sending email through Linux/Unix/AIX machines. There is an easy way to send a text only email using sendmail command lines tools:

LINUX.COMMAND = 'echo "'
LINUX.COMMAND = LINUX.COMMAND :'From: joe@mydomain.com\n'
LINUX.COMMAND = LINUX.COMMAND :'To: bob@mydomain.com\n'
LINUX.COMMAND = LINUX.COMMAND :'Subject: Test Subject\n'
LINUX.COMMAND = LINUX.COMMAND :'Content-Type: text/plain\n'
LINUX.COMMAND = LINUX.COMMAND :'Mime-Version: 1.0\n'
LINUX.COMMAND = LINUX.COMMAND :'\n'
LINUX.COMMAND = LINUX.COMMAND :'text body'
LINUX.COMMAND = LINUX.COMMAND :'" | /usr/sbin/sendmail -t --'
EXECUTE "!": LINUX.COMMAND

menu
menu