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

Problem sending Excel attachment using MIME

Tony Schroeder
Occasional Advisor

Problem sending Excel attachment using MIME

I have been working on setting up VMS mail to send attachments using MIME. I can successfully send text files & RTF files. However, I have tried several different /content_type(s) and /encoding (s), and the Excel file won't open on the Windows machine when it is sent as an attachment from VMS. The file arrives and the icon looks ok, but when I open it, it says it is not recognized and is damaged. I get about 10% of the data in a scrambled format, but it is mostly junk. Is there some special switch to use in MIME, or some other setup on VMS I am missing?

8 REPLIES
Volker Halle
Honored Contributor

Re: Problem sending Excel attachment using MIME

Tony,

welcome to the OpenVMS ITRC forum.

I've tested sending a .XLS file in a MIME mail to Outlook and it worked fine.

Using OpenVMS Alpha V8.2, MIME V1.9

$ MIME
MIME> NEW x.x
...
MIME> ADD/BIN file.XLS
MIME> SAVE

$ MAIL x.x user/subj=XLS

The encoding is like this:

--OpenVMS/MIME.991954266.1139497633
Content-Type: application/octet-stream
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=xxx.XLS

...

How did you get the .XLS file to your OpenVMS system ? Binary mode would be required for FTP.

Volker.
Tony Schroeder
Occasional Advisor

Re: Problem sending Excel attachment using MIME

We are running Advanced Server (Pathworks) to use our VMS machine as our Windows file server, so the .XLS files are sitting on the VMS machine.

I did the following:

MIME> new x.x
MIME> add/bin sys$data1:[_test]book1.xls
MIME> save

How can I check which version of mime I am running? We are on OpenVMS 7.3-2

Thanks.
Steven Schweda
Honored Contributor

Re: Problem sending Excel attachment using MIME

MIME> show version
MIME Version: V1.8

The lack of a "MIME /VERSION" is just one
more of its shortcomings.
Volker Halle
Honored Contributor

Re: Problem sending Excel attachment using MIME

Tony,

MIME> SHOW VERSION
MIME Version: V1.9

Save your .XLS file back to your Pathworks file server disk from the PC and have a look with DIR/FULL, DUMP etc. to try to spot differences.

Or mail the MIME mail to your VMS system (instead of to your Windows system), extract the .XLS on the VMS system and do a DIFFERENCES.

Volker.
Tony Schroeder
Occasional Advisor

Re: Problem sending Excel attachment using MIME

I got it to work! Most of the shares on our Advanced Server are set up as [Record format: Stream, maximum 0 bytes, longest 0 bytes], however, we have one that is [Record format: Fixed length 512 byte records]. I simply copied the file to the fixed lenght share, and then added it to the mime file and it worked in the e-mail.

Now my next hurdle is to find out how in DCL to convert a Stream formatted file to the Fixed length 512 format. Is there a simple command for that?

Jim_McKinney
Honored Contributor

Re: Problem sending Excel attachment using MIME

If that copy from share to share that you referenced was done from using DCL COPY then this is likely as simple as changing VMS' view of the file

$ set file/attr=(rfm:fix,lrl:512) sys$data1:[_test]book1.xls


Try it... if that's not the answer then a

$ DIRE/FULL

of the file before and after the copy operation will likely offer clues as to how to "convert" the file.
Tony Schroeder
Occasional Advisor

Re: Problem sending Excel attachment using MIME

The set file/attr command does the trick. The one thing it doesn't do however is change the Record Attributes: They are listed as Carriage return carriage control when I do a dire/full on the file. I would like them to be None.
Tony Schroeder
Occasional Advisor

Re: Problem sending Excel attachment using MIME

I found the last part of the file set/attr command that I needed.

$ set file/attr=(rfm:fix,rat:none,lrl:512) copy_file.xls

Thanks for all the help.