Sending Mail
The post office originates a message destined for your network by formatting
it with an envelope, message header, and message text and then spooling the
message to a JES queue.
The MAIL FROM: command sent by USMTP comes from the X-FROM: line. The RCPT
TO: commands sent by USMTP comes from the X-TO: lines. The rest of the text of
the file is sent by USMTP after the DATA command.
Example
This example shows a sample outgoing mail file:
X-FROM: [email protected]
X-TO: abcdef@remotehost
To: abcdef@remotehost
Date: Tue, 12 Jan 91 10:11:12 EST
From: [email protected]
Subject: Status of SMTP Documentation
The documentation has been successfully completed
SPOOL#4
SPOOL#4 uses the JES subsystem interface. SPOOL#4 reads messages from a JES
queue and creates cataloged data sets. SPOOL#4 signals USMTP. The data sets
created by either have RECFM=VBA and data set names in this form:
'directory.Djjjjj.Thhmmss0.Nxxxx
Syntax Description
jjjjj
|
Julian date
|
hhmmss
|
Time of day in hours, minutes, and seconds
|
xxxx
|
The nth data set processed during that second
|
The data set name prefix directory is a SPOOL#4/USMTP configuration parameter
(the PATH parameter on the SMTP statement in the file APPCFGxx).
Sample Jobs
The following sample jobs can be used to send a mail file to RMT21 (the
REMOTE parameter on statement SMTP in the APPCFGxx member) for SPOOL#4 to pick
up and convert into a mail data set:
This first sample reads from a file (T01TCP.ACCES.EMAIL(NEWMAILD):
//ICSGENER JOB (TSO00,,,99),'WRITE TO SPOOL#4',
//MSGCLASS=X,CLASS=A
//*
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=T01TCP.ACCES.EMAIL(NEWMAILD)
//SYSUT2 DD SYSOUT=A,DCB=*.SYSUT1,
// DEST=RMT21
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//
Or, you may use the following to include the mail message in your job:
//ICSGENRM JOB (TSO00,,,999),'WRITE TO SPOOL#4',
//MSGCLASS=Z,CLASS=A
//*
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD *
X-From: [email protected]
x-to: [email protected]
Date: Tue, 7 Nov 89 11:08:49 EST
From: [email protected]
to: [email protected]
Subject: test mail
We test mail through iebgener batch job.
test mail test mail test mail test mail test mail test mail
This is the last line.
/*
//SYSUT2 DD SYSOUT=A,DCB=(LRECL=80,BLKSIZE=3120,RECFM=FB),
// DEST=RMT21
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
Study Notes Home | Next Section>>