From: mathog@seqaxp.bio.caltech.edu Sent: Thursday, October 05, 2000 11:04 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: VMS Mail - Sending binaries In article , fabio_compaq@ep-bc.petrobras.com.br writes: >Is there a way to send by VMS Mail a .PDF file attached (I have SMTP >configured and >it works fine) and extract it in Win platform ???? I am testing it and the >binary comes in the >body of the message . .. This may be in the FAQ. And the real answer is that the Q really needs to add a few whistles and bells to MAIL, as it's getting pretty old (but is fundamentally sound.) There are basically two methods. 1. find the VMS version of pine and install that. 2. pick up a version of MPACK and install it. Then pick up http://seqaxp.bio.caltech.edu/pub/SOFTWARE/MMAIL.COM MMAIL.COM takes these parameters: P1 File(s) to be mailed - they WILL be deleted!!!! (Comma delimited) P2 Address(es) to mail to. P3 If defined, use second mode (via port 25) instead of MULTINET mode. So that $ @mmail "login.com,foo.splat,whatever.txt" "nobody@nowhere.com" yes would send those 3 files as attachments to the address shown through the port 25 method. Read the notes inside the procedure for more information. Another posted suggested you pack things up and then use MAIL, but that will NOT work, as MAIL always puts a space after the headers it supplies. However, there is a very clever work around for that which Howard Foote and (or?) Rick Williams came up with. The trick is to put all the headers into the subject line so that the inevitable space won't break the MIME headers. First you use MPACK to make binary attachments, then do something like: $ cr[0,8] = 13 $ lf[0,8] = 10 $ subject = "This is a test." + cr + lf - _$ + "Mime-Version: 1.0" + cr + lf - _$ + "Content-Type: text/enriched" $ write sys$output subject This is a test. Mime-Version: 1.0 Content-Type: text/enriched $ mail/subject="''subject'" tt: "SMTP%""anybody@xyzcompany.com""" Enter your message below. Press CTRL/Z when complete, or CTRL/C to quit: Sometimes redI even amaze myself! ctrl-Z <-- i.e., here I typed a ctrl-z $ VMS 7.2 also comes with MIME but that program isn't worth bothering with at this time since it won't let you actually send a MIME message (except to another VMS system). To use it I had to do $ mime:==$sys$system:mime Still, if you like this program you could use it instead of MPACK, and mung up MMAIL.COM to process the output from MIME. One other thing to be aware of. If you have a forward set on a VMS account to an SMTP mail address MIME mail will be transferred correctly to its final destination and will be extractable with normal MIME tools. However, if you receive a message, read it, find it interesting, and then use the MAIL "forward" command to send it the resulting message will be broken when received. Regards, David Mathog mathog@seqaxp.bio.caltech.edu Manager, sequence analysis facility, biology division, Caltech