Operating System - HP-UX
1833793 Members
2565 Online
110063 Solutions
New Discussion

Sendmail Attached File Problem

 
SOLVED
Go to solution
Rob Smith
Respected Contributor

Sendmail Attached File Problem

I have some scripts that are set up to send me their output via e-mail everyday.

Example: /usr/local/bin/daily.sh | mailx -s "Daily Stats" root

Everything works fine except for the fact that it sends me the output as an attachment. Not in the body of the e-mail as I would like and I get this message when I recieve the mail:

This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set.

Is there a setting in sendmail that I have to change? Or is something on the exchange server that this mail goes to? Any help would be appreciated. Many thanks in advance.

Rob Smith

Learn the rules so you can break them properly.
2 REPLIES 2
Rita C Workman
Honored Contributor
Solution

Re: Sendmail Attached File Problem

Maybe I could suggest something slightly different than just sending output to a mail statement.
usr/local/bin/daily.sh | mailx -s "Daily Stats" root

#./usr/local/bin/daily.sh > daily_out.txt | mailx -s "subject" root < daily_out.txt

I just tried this....created a dummy script to run ls and out to this output file ..it sent me the file in the body of the message../ Then I changed the script to just run ls (no output to file in this script) and mail it...it mailed it in the body of the message.

Just a thought,
/rcw
James L Shirley (4075)
Occasional Advisor

Re: Sendmail Attached File Problem

Here is what I do:
(
echo "To: whoever@wherever.com
Subject: WHATEVER YOU WANT YOUR SUBJECT TO BE "`date +%D`"
Contents:
"
) > Message.txt
cat ERROR_TEXT >> Message.txt
sendmail -t < Message.txt
No Indian prince has to his palace ...