Post by Jan-Erik Soderholm Post by Jeff Smith
Is it possible to mail a file as an attachment using mail routines. I am
using mail$send_add_bodypart, but for some reason the file is appended
to the email body not an attachment.
Google "nbl mail mime vms" and you'll get some pointers to
the NBL utility. You have to create your mail with attachement
first as a plain text file and then send it using NBL.
I usually also sent VMS mails with attachement by first
UU-encoding the binary file and then just mailing it.
Most mail clients interpret an UU-encoded part of a mail
as an attachement.
There are many ways to do this. If you don't mind constructing your own
MIME headers and and message boundaries, you can do it with the SFF
(Send From File) utility and get complete control over the message body
$ MCR TCPIP$SYSTEM:TCPIP$SMTP_SFF
Usage: SMTP_SFF infile_name [-log logfile_name] [-loglevel log_level]
infile_name : Name of text input file containing SMTP mail to send.
logfile_name : Name of text log file to log diagnostics to. (Default
log_level : Debug log level. 1 or 0 at this time. (Default 0)
or with the help of UUENCODE:
ENCODE input-file output-file
or the MIME utility (type HELP MIME)
It's also a question that has been asked and answered many times. The
first two answers I found in a few seconds were: