Operating System - OpenVMS
1827855 Members
1595 Online
109969 Solutions
New Discussion

Re: Mail/subject Need with an attachment

 
SOLVED
Go to solution
Joseph Drozdz
Advisor

Mail/subject Need with an attachment

I know how to send mail as SMTP to an e-mail account as the exapmple below, But how can I send the same mail to include an attachment as well.
EXAMPLE:
`mail /subject=" SUPER Access Report" SUPER.Rpt SMPT%"Joseph_Drozdz\@hth.com"`;
15 REPLIES 15
Robert Gezelter
Honored Contributor

Re: Mail/subject Need with an attachment

Joseph,

I do not recall a way to directly do this using standard HP-supplied components.

You can implement this with a C-Kermit script which connects to the local SMTP server directly (I know that it can be done because a client of mine had precisely this need a while ago, and it worked perfectly).

C-Kermit is available as a download from Columbia University (http://www.columbia.edu).

- Bob Gezelter, http://www.rlgsc.com
Richard Brodie_1
Honored Contributor
Solution

Re: Mail/subject Need with an attachment

You can use the MIME tool, if you have a sufficently recent version of VMS. See HELP MIME.
Robert Gezelter
Honored Contributor

Re: Mail/subject Need with an attachment

Joseph,

As Richard has kindly pointed out, there is the MIME tool.

What version of OpenVMS are you running?

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: Mail/subject Need with an attachment

Also worth looking at SFF (Send From File). See SYS$SYSTEM:TCPIP$SMTP_SFF. Documentation in the TCPIP manuals.
A crucible of informative mistakes
Martin Vorlaender
Honored Contributor

Re: Mail/subject Need with an attachment

Probably the easiest way to (just) send an attachment is the one T4 uses:

$ Uuen :== $tcpip$uuencode
$ Uuen input_file output_file.uue
$ mail/subj="..." output_file.uue recipient

Outlook, for example, recognizes this as an empty mail with an attachment.

cu,
Martin
Robert Atkinson
Respected Contributor

Re: Mail/subject Need with an attachment

Joseph, I prefer the MIME method, and it's really easy to use.

I've attached a procedure we use to email messages directly from VMS with multiple attachments. It even has a HTML message body for that all important SPAM look :)

Rob.
Joseph Huber_1
Honored Contributor

Re: Mail/subject Need with an attachment

If You have the MIME utility (on recently new systems), my send_attach.com may help:

http://wwwvms.mppmu.mpg.de/util/com/send_attach.com
http://www.mpp.mpg.de/~huber
Joseph Drozdz
Advisor

Re: Mail/subject Need with an attachment

All With further trial and errors I found a differenct way than suggested. Thanks to all who responded to this post. To send a mail with an attachment to outlook, I used the /signature_file along with Mail/subject.

UUE == "$SYS$SYSTEM:TCPIP$UUENCODE.EXE"
UUE call_rpt.xls Recall_rpt.UUE
MAIL/subject="Today's report"/SIGNATURE_FILE=QRT_Recall_rpt.UUE mms_orders_fc.txt SMPT%"Joseph_Drozdz@HTH.COM"
del call_rpt.UUE;*
Hein van den Heuvel
Honored Contributor

Re: Mail/subject Need with an attachment

Excellent! Give yourself 10 points.

Seriously though... Nice trick.
Thanks for reporting back.

Hein.
Martin Vorlaender
Honored Contributor

Re: Mail/subject Need with an attachment

Hein, you beat me - I was just about to send the same response.

Joseph, I'll put that nice idea into my toolbox.

cu,
Martin
Joseph Huber_1
Honored Contributor

Re: Mail/subject Need with an attachment

Yes, sending uuencoded as signature file is nice and quickly programmed, -but:

since the mail does not have correct MIME headers, not all readers will recognize the result as attachments, most notably on VMS:

Yahmail just gets the uuencoded as text, doesn't interpret it as attachment.

VMS UUDECODE does not decode the /noheader extracted file: You have to edit and remove the SMTP headers before uudecode.

The VMS MIME utility does not recognize the uuencoded as an attachment.

Well, on VMS one can use MUNPACK, this works.
http://www.mpp.mpg.de/~huber
Robert Gezelter
Honored Contributor

Re: Mail/subject Need with an attachment

Joseph,

For safety, you need to verify that the format and the headers match the SMTP and MIME RFCs (These are available from http://www.ietf.org).

If you are not compliant with the appliable RFCs, then you will encounter problems with different mail readers. Remember, just as the old saw about "One swallow does not make a spring", the fact that a single mail reader processes the message correctly does not guarantee that the format is correct. Correctness is defined as conforming to the RFC.

- Bob Gezelter, http://www.rlgsc.com
Author, History and Evolution of Electronic Mail, Handbook of Information Security
Martin Vorlaender
Honored Contributor

Re: Mail/subject Need with an attachment

Josef,

>>>
since the mail does not have correct MIME headers, not all readers will recognize the result as attachments [...]
<<<

Technically speaking, this isn't a MIME mail at all (so there are neither MIME headers, nor MIME multipart bodies). It's just that some MUAs (most notably Outlook) show UUEncoded files embedded in a mail as an attachment.

Binary attachments contained in MIME mails are most often encoded using Base64, as this produces less overhead than UUE.

cu,
Martin
Joseph Drozdz
Advisor

Re: Mail/subject Need with an attachment

thanks again all!!
Jan van den Ende
Honored Contributor

Re: Mail/subject Need with an attachment

Joseph,

from your Forum Profile:


I have assigned points to 56 of 72 responses to my questions.

It really is only about one stream, dating back to 2004.

Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.

Thanks on behalf of your Forum colleagues.

PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.