[Info-vax] SFF and MIME

Peter Weaver info-vax at weaverconsulting.ca
Thu Dec 10 12:31:20 EST 2009


> SFF is the only safe way to send mime emails on current versions of VMS.
> (consider that the VAX version will never work properly for instance).
> MAIL may work depending on what version of everything you have.

I have not yet seen the OP's message but this is a little .COM that should
send attachments from any version of VMS (even a VAX). The trick is putting
<CR><LF> into the subject and building your Mime header there.

$ Type send_mail_attachment.com 
$!
$ if "''p1'" .eqs. "" then p1 = "''f$environment("PROCEDURE")'" !Attachement
$ if "''p2'" .eqs. "" then p2 = "info at weaverconsulting.ca" ! To is P2
$ if "''p3'" .eqs. "" then p3 = "Test from VMS"  ! Subject is P3
$!
$ cr[0,8]=13
$ lf[0,8]=10
$ quote[0,8]=34
$!
$ subjectline = "''p3'" + cr + lf + -
                "Mime-Version: 1.0" + cr + lf + -
                "Content-Type: text/plain" + cr + lf + -
                "Content-Disposition: attachment; filename=" + quote + -
                p1 + quote
$!
$ mail 'p1 smtp%"''p2'" /subject=&subjectline
$!

Peter Weaver
www.weaverconsulting.ca
Winner of the OpenVMS.org Readers' Choice Award for System
Management/Performance
http://www.linkedin.com/in/peterweaver
  






More information about the Info-vax mailing list