Operating System - OpenVMS
1829502 Members
1702 Online
109991 Solutions
New Discussion

Re: Sending thru VMS [SMTP] mail as an attachment?

 
Zia_Ahmad
Occasional Advisor

Sending thru VMS [SMTP] mail as an attachment?

Does anyone know how I can send via SMTP [VMS mail] as an attachment.
This works on a Multinet[v4.4]Vms[7.3-2]:
Mail/Sub="test"/type=1/for file.txt "z@z.com"
[/type=1/for are undocumented]

But does not work on a VMS 7.3-2 using TCPIP 5.4 ECO 5 system [file shows up in the message body].
Consulting guarantee - Money back!
9 REPLIES 9
John Gillings
Honored Contributor

Re: Sending thru VMS [SMTP] mail as an attachment?

Zia,

Two supported methods:

Use the MIME utility to create a mime encoded file containing your attachments then send the file using a normal MAIL command. (Make sure you have the latest MIME patch).

Use the SMTP_SFF utility to send your mime encoded file - see documentation:

HP TCP/IP Services for OpenVMS User's Guide
Section 5.9 SMTP SFF (Send From File)
A crucible of informative mistakes
John Gillings
Honored Contributor

Re: Sending thru VMS [SMTP] mail as an attachment?

There's some more detail, and an example at

http://h71000.www7.hp.com/wizard/wiz_4492.html
A crucible of informative mistakes
labadie_1
Honored Contributor

Re: Sending thru VMS [SMTP] mail as an attachment?

My preferred way is

Example-C,C++ SMTP Mail Message Sender With MIME File Attachments

http://h18000.www1.hp.com/support/asktima/communications/009F15E8-A8CE0B38-1C02A1.html
Dave Laurier
Frequent Advisor

Re: Sending thru VMS [SMTP] mail as an attachment?

You may benefit from the sendmail.com script that can be found at http://dcl.openvms.org.

This script allows one to send MIME or SMTP messages and allows files to be attached.

A direct link to the script:

http://dcl.openvms.org/stories.php?story=04/09/22/8507303
Zia_Ahmad
Occasional Advisor

Re: Sending thru VMS [SMTP] mail as an attachment?

I looked over some of the suggestions. The file I am trying to send is a GZIP file and as mentioned earlier from Multinet this shows up as an attachment.
The DCL program [Sendmail.com] is buggy.
Am I missing something? Thanks for all the suggestions.
Consulting guarantee - Money back!
Volker Halle
Honored Contributor

Re: Sending thru VMS [SMTP] mail as an attachment?

Zia,

why not use MIME ?

$ MIME:==$SYS$SYSTEM:MIME.EXE

$ MIME
MIME> NEW/NOEDIT file.tmp
MIME> ADD/BIN file.GZIP
MIME> SAVE
$
$ MAIL file.tmp "z@z.com"/SUBJ="Mail with attachment"

MIME is a supported OpenVMS utility.

Volker.
Dave Laurier
Frequent Advisor

Re: Sending thru VMS [SMTP] mail as an attachment?

The sendmail.com DCL command file is using the standard mail or mime utilities. Can you tell what is so buggy about it? What problems do you encounter when using this script?
Zia_Ahmad
Occasional Advisor

Re: Sending thru VMS [SMTP] mail as an attachment?

Hi Volker, I tried your suggestion and no mail showed up at all??
This may be due to some other issue. Sigh.
Consulting guarantee - Money back!
Volker Halle
Honored Contributor

Re: Sending thru VMS [SMTP] mail as an attachment?

Zia,

for testing, you can also send this mail to your OpenVMS account:

$ MAIL file.tmp username/SUBJ="Mail with attachment"

Then read and extract the new mail:

$ MAIL
MAIL> READ/NEW
MAIL> EXTRACT/NOHEAD x.x
MAIL> EXIT
$ MIME x.x
MIME> LIST
MIME> EXTRACT/ATTACHMENT=n
MIME> EXIT

This will extract your GZIP file from the mail. And it works, I've used it often enough.

Volker.