Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

send a file as attachment in OpenVMS mail

SOLVED
Go to solution
Desmond Or
Advisor

send a file as attachment in OpenVMS mail


I use OpenVMS MAIL utility to send a file to an Internet email user, but I cannot send the file as an attachment.

Does anybody know what is the right DCL command to send a file as attachment using OpenVMS mail utility?
6 REPLIES
Hein van den Heuvel
Honored Contributor

Re: send a file as attachment in OpenVMS mail

You probably want to use "MIME"

Issue the command MIME or MCR MIME on you system and see if it prompts "MIME> "

Now type "Show version" and "Help overview"

Google "openvms mime" and/or faq for details.

hth,
Hein.
The Brit
Honored Contributor

Re: send a file as attachment in OpenVMS mail

If I remember correctly, it was just

$ mail
MAIL> mail


It doesn't attach the file, it inserts the file contents as the body of the mail message. (Obviously only works with text files.

Dave.
Hoff
Honored Contributor
Solution

Re: send a file as attachment in OpenVMS mail

You can use MAIL> SEND filename or 'MAIL filename user /subject="whatever"' to send the text as the message.

You can use the MAIL> SEND/FOREIGN mechanism to send a primitive form of an attachment, if you have DECnet Phase IV or DECnet-Plus end-to-end. This doesn't work if you connect through SMTP or other mail transports.

You can use the MIME utility to roll your own MIME-encoded message from DCL, and then SEND the message.

Or you can use the Mozilla Suite and its mail utility or any of various other email clients that have integrated MIME support within the tool. There are various options here. PINE and PMDF mail come to mind, though there are most certainly some other options around.

The OpenVMS FAQ (http://www.hoffmanlabs.com/vmsfaq) has a section entitled "How do I send or read attachments in VMS MAIL?" which has some related details here. There's a PDF and a text-format copy of the FAQ available for download, and these can be quickly searched for various keywords.

Jan van den Ende
Honored Contributor

Re: send a file as attachment in OpenVMS mail

Desmond,

a DCL script to achieve this can be found at

http://dcl.openvms.org/stories.php?story=04/09/22/8507303

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Wim Van den Wyngaert
Honored Contributor

Re: send a file as attachment in OpenVMS mail

here is our version in DCL. It does some extra stuff like zipping or pdf-ing.

Wim
Wim
Peter Zeiszler
Trusted Contributor

Re: send a file as attachment in OpenVMS mail

Normally when I have to send small files I use the mail function as:
mail filename.txt /subj="Some subject line so I know it" smtp%"myemail@company.com"

But when I have to send zip files as attachments I use the uuencode first.
uuencode filename.zip filename.uue
UUENCODE == "$SYS$SYSTEM:TCPIP$UUENCODE.EXE"

Then I email that file
mail filename.uue /subj="Some subject line so I know it" smtp%"myemail@company.com"

This gets the .zip file across to my email application as an attachment.

I believe that the uuencode is part of the TCPIP stack. Its also on the freeware CD as UUCODE - but I am not familiar with the freeware one.