Joeyg,
you can send both text and attachment with mailx.....
but the problem arises when you use the html text, the attached file get distorted...
like i m trying to send the mail using the following code:
Code:
echo "mail body" > tempfile
uuencode try.sh try.sh >> tempfile | mailx -s "Hi - This
is mail subject" user@domain.com < tempfile
Now if try the following code everything goes fine even in this case but the attachment contents get distorted and it can NOT be read (the attachment seems to get encoded)..
Code:
(
echo "MIME-Version: 1.0"
echo "Content-Type: mutipart/mixed;"
echo ' boundary="PAA08673.1018277622/server.domain.com"'
echo ""
echo "This is a MIME-encapsulated message"
echo ""
echo "--PAA08673.1018277622/server.domain.com"
echo "Content-Type: text/html"
echo ""
echo "<HTML>
<BODY bgcolor=red>
<blockquote>
<p><font color=black>Please find the attached report.</font></p><p> <font color=blue>Message by someone</font></p><p> <font color=blue>Body</font></p></blockquote>
</body>
</html>"
echo "--PAA08673.1018277622/server.domain.com"
) > temp
uuencode just.doc just.doc >> temp | mailx -s "Subject here" user@domain.com < temp
Please solve this error!