0

I have written a script that output pdf files and print some stuff on the console. I am looking to be able to

  • send those files by email
  • as well as the output of the console.

I am using a linux redhat RHEL6 distro and ksh (I CAN'T use bash).

How can I do that ?

EDIT

The following is NOT working can you see why ??

#!/bin/bash
echo "coucou" > /tmp/mailmessage.txt
mutt -s "Test mail" -a /home/zo/Documents/scripts/test.txt me@gmail.com < /tmp/mailmessage.txt

Getting the following error

zo@Pavilion:~/Documents/scripts$ ./muttme.sh 
Can't stat me@gmail.com: No such file or directory
me@gmail.com: unable to attach file.
statquant
  • 13,672
  • 21
  • 91
  • 162
  • bash or ksh should not make a difference. See also: [Sending a mail from a linux shell script](http://stackoverflow.com/questions/5155923/sending-a-mail-from-a-linux-shell-script) – Henk Langeveld Feb 27 '14 at 10:56
  • possible duplicate of [Shell script to send email](http://stackoverflow.com/questions/4658283/shell-script-to-send-email) – Henk Langeveld Feb 27 '14 at 10:57

0 Answers0