Operating System - Linux
1824962 Members
3488 Online
109678 Solutions
New Discussion юеВ

Re: sendmail: why do I get plain Text instead of a file?

 
SOLVED
Go to solution
Juerg DENNEBERG
Advisor

sendmail: why do I get plain Text instead of a file?

Hi you all

here is the sendmail part of my script. I am usin RH Linux 8 and sendig to Lotus-Notes. Instead of getting an attached File I get plain Text with the Mail:

{
echo To: $EMAIL_TO
echo From: $EMAIL_FROM
echo CC: $EMAIL_CC
echo Subject: $EMAIL_SUBJECT
uuencode -m "$ip_out/$x" "$ip_out/$y"
} | /usr/sbin/sendmail "$EMAIL_ALL"


and here is the first part of the result (it should be the file A_..... .xls):

begin-base64 644 /opt/aa40/ip_out/A_09B67FEF55B9EF4941256DE300533DE6.xls
PGFhPgp6aXh8MTUwNjR8Q049U3RlZmFuIFppbW1lcm1hbm4vT1U9QkUvT1U9
VGVsZW1hdGljL089QUVZL0M9Q0h8MDAwMjEyMDYzMXwxNC4xMS4yMDAzfDA5
QjY3RkVGNTVCOUVGNDk0MTI1NkRFMzAwNTMzREU2DXx8MTg4fDIxMDF8Cjxh


Many Thanks

Juerg
The personal liberty goes so far as it does not affect the liberty of others
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail: why do I get plain Text instead of a file?

I'm attaching a production script that properly does attachments.

I never had any success with uuencode.

The attachment is called mailfile. I'm doing an upgrade next week to allow it to take multiple workd subjects.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: sendmail: why do I get plain Text instead of a file?

I did the re-write. Subject is any argument after and including argument 5.

5 Arguments required.

If you decide to point, one or the other please. I'm close to a goal and I want everything to be earned.

I should have done the re-write prior to my first post.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
smatador
Honored Contributor

Re: sendmail: why do I get plain Text instead of a file?

try with elm
echo "[include name_of_file application/octet_stream base64]">>$MAIL_N
AME
elm -s "MAIL_SUBJECT" MAIL_TO <$MAIL_NAME