[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
- Subject: Re: Mailing SQR report from unix
- From: "Warner, Dave (CCB)" <warnerd@WDNI.COM>
- Date: Fri, 9 Jul 1999 15:06:50 -0700
Sorry if I wasn't clear. When you run the SQR at night, or whenever, using
the command I showed below, it will kick off elm in a batch mode, which does
not require user interaction at all.
What I meant is that before this "batch mode" will work -- before the the
very first time you try it -- you must log in once as the user who will be
running the SQR and run elm (by typing 'elm'), so it can create a .elm
directory in that user's home directory and do whatever other setup it has
to do.
I don't think that there is a way to send attachments from mail or mailx.
If you pipe a file into a mail command, as your example shows below, it will
send the file as the message body. Elm does exactly the same thing, but it
has functionality such that your message body can be text which elm
interprets and uses to attach files.
> ----------
> From: Karimundackal, Liz J.[SMTP:lkarimundackal@JHANCOCK.COM]
> Sent: Friday, July 09, 1999 12:12 PM
> Subject: Re: Mailing SQR report from unix
>
> 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
> 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
> >
>