From cirkit, 1 Year ago, written in Bash.
Embed
  1. #!/usr/bin/env bash
  2.  
  3. ## use the 'at' command to send an outgoing email at a specific time
  4. ## Staff <admin@kode.email>
  5. MAILTO=''
  6. MAILFROM=''
  7. SUBJECT=''
  8. MESSAGE=''
  9. AT="at 4:01 AM Today" # 'at' expressions: http://www.computerhope.com/unix/uat.htm
  10. Cc=''
  11. Bcc=''
  12.  
  13. # Begin
  14. $AT <<EMAIL
  15. mail -s "$SUBJECT" -c "$Cc" -b "$Bcc" -r "$MAILFROM" "$MAILTO"
  16. $MESSAGE
  17. EMAIL
  18.  
  19. # EOF