[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Mailing SQR report from unix



i have tried your command from unix prompt and shell script.
I got the same result. It works .

i have done the test on solaris 2.6

try to do this :
mail root < file.uuencode

go to /usr/mail
and copy the root file to root.old

execute the same command in a shell script
and compare the file root and root.old to see if there are difference


franck,


Karimundackal, Liz J. wrote:
>
> Thanks for the suggestion, but the SQR program will be kicked off by a unix
> script in the night,
> so there is no means of running elm interactively and moreover I do not have
> elm!!
> I tried to send the mail from a Unix Shell script but the same problem
> occurs.
> I tried a : uuencode letter.htm letter.htm | mail lkari@jjjj.com
> It send the uuencoded characters as the text of the message!!
> I would really like to know why something that works perfectly from the
> command prompt will not work from SQR or Unix shell script!!
>
> Thanks for all the help.
>
>         -----Original Message-----
>         From:   Warner, Dave (CCB) [SMTP:warnerd@WDNI.COM]
>         Sent:   Friday, July 09, 1999 2:27 PM
>         To:     Multiple recipients of list SQR-USERS
>         Subject:        Re: Mailing SQR report from unix
>
>         If you have elm installed you can send attachments like this:
>
>         let $command = 'echo "[include /tmp/file1.txt text/plain]\n[include
>         /tmp/file2.pdf application/pdf]" | elm -s "Subject"
> email@address.com'
>         call system using $command #mail_status
>
>         More files can be included with a \n separating them.
>
>         The user who is running the SQR must first run elm once
> interactively before
>         it can be run in "batch mode" like this.
>
>         Elm takes care of the uuencoding for you, unlike mail or mailx.
>
>         > ----------
>         > From:         Karimundackal, Liz
> J.[SMTP:lkarimundackal@JHANCOCK.COM]
>         > Subject:      Mailing SQR report from unix
>         >
>         > Hi all,
>         >         I am trying to mail the report created by my SQR program
> from the
>         > same program.
>         >         My code is :
>         > let $command = 'uuencode letter.htm letter.htm > letter.uue'
>         > call system using $command #encode_status
>         > let $command = 'mail lkarimundackal@jhancock.com < letter.uue'
>         > call system using $command #mail_status
>         >
>         > My intention is to send the report as an attachment. I tried the
> uuencode
>         > and the mail command
>         > from the unix prompt and it worked great, but when I do the same
> commands
>         > from SQR, the
>         > encoded file goes as text, so the mail has a lot of junk as the
> text. All
>         > the files, including the uuencoded
>         > file is created properly from SQR and both commands have a success
> return
>         > code.
>         >
>         > Any help will be appreciated.
>         > Thanks in advance,
>         > Liz J Karimundackal
>         > (617) 572-8288
>         > e-mail : lkarimundackal@jhancock.com
>         >