Skip to content

Instantly share code, notes, and snippets.

@kinopyo
Created September 22, 2012 09:50
Show Gist options
  • Select an option

  • Save kinopyo/3765702 to your computer and use it in GitHub Desktop.

Select an option

Save kinopyo/3765702 to your computer and use it in GitHub Desktop.
Bash test send mail.
#!/bin/bash
fromAddr="admin@example.com"
toAddr="foo@bar.com"
subjString="subject ha nihongo ng!?"
bodyString="hello how are you"
echo -e "From: <${fromAddr}>\nTo: <${toAddr}>\nSubject:${subjString}\n\n${bodyString}" | /usr/sbin/sendmail -t ${toAddr}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment