Operating System - OpenVMS
1753882 Members
7190 Online
108809 Solutions
New Discussion юеВ

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

 
SOLVED
Go to solution

Sending Mails from OpenVMS with Attachments (.ZIPS)

Hello,
ist it possible that i can sending Mails over OpenVMS with attachments?
Im looking for examples who i can send ZIP-Files or Binary Files etc. to another Mailsystems.

Thanks for your Tips

17 REPLIES 17
Volker Halle
Honored Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Manfred,

yes - you can use the MIME utility to do compose messages with attachments and then send the resulting file to other mail systems.

Example:

$ MIME
MIME> NEW/NOEDIT x.x
MIME> ADD/BIN abc.zip
MIME> SAVE

Then send file x.x to your other mail system with

$ MAIL x.x "user@mail.domain"/SUBJ="Test"

Volker.
Martin Vorlaender
Honored Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

There's the MIME utility to compose MIME mails, see http://h71000.www7.hp.com/doc/731FINAL/6489/6489pro_014.html#mice

HTH,
Martin
Ken Robinson
Valued Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

I'm not sure where I found the following code:

$ set noon
$! set nover
$ ext = f$edi(f$par(p1,,,"type"),"lowercase")
$ fn = f$edi(f$par(p1,,,"name"),"lowercase")
$ if ext .eqs. ".com"
$ then
$ zip 'fn'.zip 'p1'
$ uuencode 'fn'.zip 'p1'_uu
$ else
$ uuencode 'p1' 'p1'_uu
$ endif
$ mail/sub="''p1'" 'p1'_uu "''p2'"

As you can see it uses uuencode to send files.

Ken
Craig A Berry
Honored Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

In addition to MIME, there is another utility called MPACK that ought to do the trick. Personally I use Perl with the MIME::Lite module; read about it here:

http://www.akadia.com/services/email_attachments_using_perl.html
Petr Spisek
Regular Advisor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Hi,
you can use classic VMS mail:
$ uuencode := $ tcpip$uuencode
$ uuencode myfile.zip myfile.dat
$ mail myfile.dat "email-adres@something.com" /subject="Mail with attachment"

Petr
(You could set $uudecode := $ tcpip$uudecode for decoding, but it doesn't needed for this)
Robert Atkinson
Respected Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Is there any way to get text into the message body as well?

Rob.
Petr Spisek
Regular Advisor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Rob,
mail mytextfile.txt "email@addr.com"

Petr
Volker Halle
Honored Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Rob,

with MIME you can also put text into the message body before adding your attachements:

$ MIME
MIME> NEW/EDIT x.x
...
MIME> ADD/BIN abc.zip
MIME> SAVE

Volker.
Robert Atkinson
Respected Contributor

Re: Sending Mails from OpenVMS with Attachments (.ZIPS)

Was thinking more along the lines of an automated procedure.

We wrote a VB program some time ago that is capable of taking a VMS created file and attaching it to an email using MS Oulook, then sending it off to a list of users.

This relies on Pathworks, Exchange and a PC logged on.

If I can transfer the whole thing onto the Alpha, but still have it run unassisted in batch, it will simplify the whole process.

Rob.