[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Email Attachment using Call / Call System Using comand
- Subject: Re: Email Attachment using Call / Call System Using comand
- From: Dennis Palmer <Dennis.Palmer@FERGUSON.COM>
- Date: Mon, 18 Feb 2002 12:37:38 -0500
- Thread-index: AcG4o5TNFJ3Ojn2jQV+QxgBGw7ETNQ==
- Thread-topic: Email Attachment using Call / Call System Using comand
I have had good success with 'elm' in Unix. See the code
snippets below. Check your 'man' pages for 'elm'. You
probably have it. Most Unix installations do. You build
a commands type file which tells elm to attach the designated
file. Then uuencode your attachment file if need be and
then you are good to go. Note I left some stuff out for
the sake of brevity. You can flesh it out if you decide to
use this approach.
Regards,
DennisP
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.
.
.
! use 'elm' to email the file
do Write-Elm-Control-File ! load the 'attachment' command into a txt file
for elm
let $unix_cmd = 'elm -s "Email subject goes here" joe.blow@somewhere.com < '
|| $filename
call SYSTEM using $unix_cmd #status
.
.
.
begin-procedure Write-Elm-Control-File
let $filename = $newreport1 || 'elm_txt'
open $filename as 1 for-WRITING record=100:vary status=#filestat
if #filestat <> 0
show ' ' ! spacing
show 'Error opening ' $filename
stop (or whatever error handling you want to do)
end-if
let $tmp = '[include ' || $uue_filename || ' application/octet-stream]'
write 1 from
$tmp
.
.
.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----Original Message-----
From: Discussion of SQR, Brio Software's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Tshenuwani Makhari
Sent: Monday, February 18, 2002 10:10 AM
To: SQR-USERS@list.iex.net
Subject: Email Attachment using Call / Call System Using comand
I am unable to send attachments using the call command , Please help !!
Here is my piece of code :
Let $Command = ' mail tshenuwani@infowave.co.za < /docs/ff.dat'
call system using $command #unix_status
WHERE ff.dat contains the mail message body.
Any other way to do this from UNIX environment ??
Regards
Tshenuwani Makhari
IT Consultant
[[ MAPI 1.0 storage : 3843 in winmail.dat ]]
* e-mail: tshenuwani@infowave.co.za
* Tel: +27 (0) 31 508 1810
* Cell: +27 (0) 82 322 0861
* Fax: +27 (0) 31 508 1808
http://www.infowave.co.za
This message may contain information which is confidential and subject to
legal privilege. If you are not the intended recipient, you may not use,
disseminate, distribute or copy this message. If you have received this
message in error, please notify the sender immediately by email, facsimile
or telephone and return and/or destroy the original message.