Operating System - OpenVMS
1748179 Members
4084 Online
108758 Solutions
New Discussion юеВ

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

 
SOLVED
Go to solution
Dan Herron
Advisor

MIME encoded JPEG attachment not viewable after sending via VMSMail

OpenVms v7.3-1
MIME v1.7

Summary:
Am trying to send a MIME encoded JPEG attachment via VMSMail to an MS-Outlook email account. The message arrives with the attachment intact. But clicking on the attachment only brings up Windows Picture Viewer with the message "No Preview Available"

Details:
Creation of MIME encoded JPEG
$MIME
NEW TEST.TXT
ADD AAA.JPG
SAVE
EXIT

Sending via VMSMail
$MAIL TEST.TXT "dherron@mymail.com"

The one clue I have is how VMS MIME encodes the JPEG vs how Outlook encodes the JPEG (I tried sending the JPEG from an Outlook account to an Outlook account and it works fine.)

The encoding of the JPEG via VMS MIME creates
the exact same stream of encoded characters as does the encoding via Outlook, BUT the VMS MIME encoding is 72 characters per line, the Outlook encoding is 76 characters per line.

So, I pulled a switcheroo and took the Outlook encoding and put it into TEST.TXT in place of the VMS MIME encoding, sent the file via VMSMail and BINGO the attachment was viewable in Windows picture viewer when I clicked on it!

Does this ring a bell with anyone?
Any suggestions how to get the VMS MIME encoding to work correctly?

Thanks for your help,
Dan Herron
6 REPLIES 6
John Gillings
Honored Contributor
Solution

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

Dan,

This is probably an issue with the attributes of the original (JPG) file.

How does the JPG get to OpenVMS and from where?
What are the record attributes?
How do the mime headers differ from a working file?

Your VMS version is very old (way too old! What are you doing on -1?) Do you have the latest MIME patch.

I've been able to get MIME to work in the past. It tends to be a bit fiddly, making sure the files don't get clobbered along the way.
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

> How does the JPG get to OpenVMS and from where?
> What are the record attributes?

And can a Web browser running on the VMS
system display the thing?

> [...] characters per line [...]

Shouldn't matter. Uuencode was more
consistent in characters/line than more
modern base64 programs.

It might be comforting to verify that your
MIME program can extract the original data
from its own pile o' MIME, but that's not
much help if the original file is junk.

I've been trying hard never to learn how to
send MIME attachments using VMS MAIL, but I
thought that one needed to use the SFF scheme
to do it (properly -- no extra blank line,
or some such annoyance). On the other hand,
if your e-mail client is able to identify
the attachments, then it may not matter.
Joseph Huber_1
Honored Contributor

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

My 7.3-1 system has no problem to send jpeg or other binary attachments.
Not sure what the default is, but ADD/BINARY jpeg-file may change the encoding.
And to do a favour to the recipient, add the miome-type, so it will be image/jpg instead of just binary.

Best to add the mime-type to
SYS$COMMON:[SYSMGR]MIME$FILETYPES.DAT
like

# JPG
jpg, image/jpg, Base64
jpeg, image/jpg, Base64
gif, image/gif, Base64
png, image/png, Base64
#
# PDF
pdf, application/pdf, Base64
#
# CDA Viewer/Ghostscript
ddif, application/ddif, Base64
eps, application/ps, Base64
ps, application/ps, Base64
ps-gz, application/ps, Base64
ps_z, application/ps, Base64
# compression,archive
gz, encoding/x-gzip, Base64
z, encoding/x-compress, Base64
zip, application/x-zip-compressed, Base64
tar-gz, encoding/x-gtar, Base64
tgz, encoding/x-gtar, Base64
gtar, application/x-gtar, Base64
tar, application/x-tar, Base64

Then You can omit the /BINARY for the files listed.

http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

Maybe also the MIME.EXE version makes a difference:
MIME 1.8 is available for VMS 7.3-1
Should be in one of the patches, check wether your system has all relevant.
http://www.mpp.mpg.de/~huber
Dan Herron
Advisor

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

Ultimately it was the RECORD FORMAT of the original JPG file which was STREAM, and needs to be STREAM_LF in order for MIME to play nice with it.

Thanks for all your help.
Dan
Isaev
Frequent Advisor

Re: MIME encoded JPEG attachment not viewable after sending via VMSMail

Hello,

I have the same problem. Could you describe the detailed solution.
Thank you!