Email output as an attachment from UNIX

Posted by LegacyUser on 22-Mar-2001 17:44

Using Progress 8.2C on HP

I was troubled trying to email output as an attachment instead of the message body. Here was my final solution. Any better?

DEF VAR outfile AS CHAR.

DEF VAR distlist AS CHAR.

DEF VAR retadd AS CHAR.

DEF VAR mailsubj AS CHAR.

DEF STREAM mailit.

ASSIGN

outfile = "Attachment.txt"

distlist = "Kevin_Krueger@afcc.com"

retadd = "Kevin_Krueger@afcc.com"

mailsubj = "Testing Email Attachments".

OUTPUT STREAM mailit THROUGH

(echo "Subject: " VALUE(mailsubj);~

echo "From: " VALUE(retadd);~

uuencode VALUE(outfile))|~

mail VALUE(distlist).

FOR EACH...

EXPORT STREAM mailit

...

END.

OUTPUT STREAM mailit CLOSE.

All Replies

Posted by LegacyUser on 08-Oct-2001 14:51

"Kevin" wrote:

>

>Using Progress 8.2C on HP

>

>I was troubled trying to email output as an attachment

>instead of the message body. Here was my final solution.

Any better?

>

>DEF VAR outfile AS CHAR.

>DEF VAR distlist AS CHAR.

>DEF VAR retadd AS CHAR.

>DEF VAR mailsubj AS CHAR.

>

>DEF STREAM mailit.

>

>ASSIGN

outfile = "Attachment.txt"

distlist = "Kevin_Krueger@afcc.com"

retadd = "Kevin_Krueger@afcc.com"

mailsubj = "Testing Email Attachments".

>

>OUTPUT STREAM mailit THROUGH

(echo "Subject: " VALUE(mailsubj);~

echo "From: " VALUE(retadd);~

uuencode VALUE(outfile))|~

mail VALUE(distlist).

>

>FOR EACH...

>

EXPORT STREAM mailit

...

>

>END.

>

>OUTPUT STREAM mailit CLOSE.

Use the mpack unix pgm (it's free)

We use it with lotus notes.

Norm

This thread is closed