Here are some pieces from an exec I wrote that relays MVS generated reports as
e-mail attachments. It has all the pieces Mike needs, I think.
build_headers:
/* BSMTP header */
h.1= 'HELO vmmail.teale.ca.gov'
h.2= 'MAIL FROM: <[EMAIL PROTECTED]>'
h.3= 'RCPT TO: <'smtpuser'@'smtpnode'>'
h.4= 'DATA'
/* RFC822 + Mime headers */
boundary= 'next_part_'date('S')'_'time('L')
h.5= 'To: <'user'@'smtpnode'>'
h.6= 'From: VM Mail Relay Machine <[EMAIL PROTECTED]>'
h.7= 'Reply-to: [EMAIL PROTECTED]'
h.8= 'Date:' date('W')',' date() time() timezone
h.9= 'Subject: Attached report from',
space(fromuser 'at' fromnode)
h.10= 'MIME-Version: 1.0'
h.11='Content-Type: multipart/mixed; boundary="'boundary'"'
h.12=' '
h.13='--'boundary
h.14='Content-Type: text/plain'
h.15='Content-disposition: inline'
h.16=' '
/* Note body */
h.16='The attached file was relayed to you by an automated process.'
h.17='Please do not reply to this message, no human will read it.'
h.18='The relay server does not maintain a list of senders or'
h.19='recieptients. Only the originator can make changes to addressing'
h.20='or content.'
h.21=' '
/* attachment header */
h.22='--'boundary
h.23='Content-Type: text/plain'
h.24='Content-disposition: attachment; filename="REPORT.TXT"'
h.25='Content-transfer-encoding: quoted-printable'
h.26=' '
h.0= 26
/* BSMTP trailer */
t.1= '--'boundary'--'
t.2= '.'
t.0= 2
return
wrap_it:
'PIPE (end $)',
'| < WORKFILE' spoolid 'A',
'| REXX QPENCODE',
'| PAD 1',
'| dot: STRNFIND /./',
'| ddot: FANINANY',
'| PREFACE STEM H.',
'| APPEND STEM T.',
'| PUNCH',
'| COUNT LINES',
'| VAR LINES_PUNCHED',
'$ dot:',
'| SPECS /./ 1 1-* N',
'| ddot:'
return
/* QPENCODE REXX - Encode to Mime quoted-printable !"[EMAIL PROTECTED]|}~ */
'CALLPIPE (end $) *:',
'| STRIP TRAILING',
'| change /=/=3D/', /* encode equal sign */
'| change x0C /=0C/', /* formfeed */
'| change x00 / /', /* nulls to blanks */
'| SPECS 1-* 1 /00/ X2C N', /* append a null as a marker */
'| SPLIT MIN 72 BEFORE =', /* split avoiding "=xx" */
'| DEBLOCK FIXED 75', /* max line 76 w/cont char. */
'| A: LOCATE *;-1 x00', /* divert lines w/o markers */
'| STRIP TRAILING x00', /* remove markers */
'| B: FANINANY',
'| *:',
'$ A:',
'| SPECS 1-* 1 /=/ N', /* add continuation char. */
'| B:'
Victor Strasser [EMAIL PROTECTED]
VM and Linux Support Unit
California Department of Technology Services
Phone: 916-464-4522
-----Original Message-----
From: Horlick, Michael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 05, 2006 10:44 AM
Subject: Re: Newbie on SMTP
Hi Ed et al,
A little rambling here (so please excuse) ....
I wasn't sure what to put in for the HELO statement (I found out that at SMTP
start up the host name is DEVVM and domain name is muhc.mcgill.ca) so at first
I wasn't sure so I put in "HELO DEVVM.muhc.mcgill.ca" and then did a SENDFILE
to user SMTP.
It didn't seem to get delivered so I tried again with "HELO muhc.mcgill.ca"
I got a response back from that one after a couple of minutes (I think it was
from that one).
Anyways it appeared both got through but which one is the correct one and does
it make a difference?
I was also wondering how VM user smtp knows which client mail server to
contact? For TCP/IP for VSE, I needed to specify the actual IP address of the
server but not for VM, I believe.
Thanks for your example.
Please send example of sending attachment
Regards
Mike
-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Ed
Zell
Sent: September 5, 2006 9:18 AM
To: [email protected]
Subject: Re: Newbie on SMTP
> My questions are: How to send with a subject line, how
> to change "from" address and any other options I can
> potentially use. Is this documented somewhere?
>
> Thanks,
>
> Mike Horlick
Mike,
I know you got a lot of responses, but I thought I would put
an example together for you. Here is a CMS file that will
send an email from my work account to my home account. I
simply send the file to SMTP after I am done editing it.
Letme know if you would like an example that sends an attachment
along with the email.
Ed Zell
(309) 674-8255 x-107
[EMAIL PROTECTED]
HELO vm.illinoismutual.com
MAIL FROM: <[EMAIL PROTECTED]>
RCPT TO: <[EMAIL PROTECTED]>
DATA
Date: 5 Sep 2006
From: Ed Zell <[EMAIL PROTECTED]>
To: Ed Zell <[EMAIL PROTECTED]>
Subject: Hi Ed
Mime-Version: 1.0
Content-Type: Text/Plain
Content-Transfer-Encoding: quoted-printable
This is a test message from my work email account to my home account.
.
QUIT
.
CONFIDENTIAL NOTICE: This communication, including any attachments, is
intended only for the use of the individual or entity to which it is addressed
and contains information which may be confidential. If you are not the
intended recipient, any distribution or copying of this communication is
strictly prohibited. If you have received this communication in error, notify
the sender immediately, delete the communication and destroy all copies. Thank
you for your compliance.