The Send IFS Mail command sends a note and an IFS attachment to one
or more recipients. The recipients are described by using a name and
a corresponding E-Mail address that must exist in a MAILADRP file or
by entering a specific E-Mail address. The SNDDST command is used
internally.
See the SNDSPLMAIL tool for sending a spooled file or the SNDTXTMAIL
tool for sending a note without an attachment.
See the MAILADR tool for how to set up and enter names into a
MAILADRP file.
Assume the name JONES exists in the MAILADRP file which is on the
library list and an E-Mail address is assigned to the JONES record.
A typical SNDIFSMAIL command would be:
SNDIFSMAIL SUBJECT('A test of SNDIFSMAIL')
IFSFILE('/xxx/yyy/zzz.aaa')
SENDTO(JONES)
TEXT('...')
The MAILADRLIB parameter defaults to *LIBL meaning the MAILADRP file
must exist on the library list. The user JONES would be searched for
in the file and the corresponding E-Mail address used to send the
message with the IFS file as an attachment.
The SENDTO parameter defaults to *SELECT which means the list of
users defined to the MAILADR tool would appear in a subfile. One or
more names may be selected by using Option 1 and then pressing Enter.
The screen is refreshed to allow additional selections. When the
selections are complete, F3 may be pressed to return to the
SNDIFSMAIL command prompt with the names of the selected users
filling the SENDTO prompt.
A 'group function' also exists to allow the sending to a group name
(a list of users). See the MAILADR tool documentation section on
'Group names'.
To send an IFS attachment by directly using one or more E-Mail
addresses, SENDTO(*INT) must be specified. This provides the
additional parameter INTADR when prompting. The command would look
like:
SNDIFSMAIL SUBJECT(xxx)
IFSFILE('/xxx/yyy/zzz.aaa')
TEXT('...')
SENDTO(*INT)
INTADR(www@xxx.zzz)
Troubleshooting
---------------
If the SNDIFSMAIL command fails, there should be appropriate messages
from the tool describing the error.
A typical error is when the Email has the correct syntax, but the
domain does not exist. You can check all the addresses in the
MAILADRP file with:
CHKMAILFLD FILE(MAILADRP) FIELD(MAINTA)
If the SNDIFSMAIL command completes normally, but no E-Mail message
arrives at the destination, try SNDDST by itself (SNDIFSMAIL command
generates SNDDST). Enter the following command:
SNDDST TYPE(*LMSG)
TOINTNET('xxxx')
DSTD('A test message')
LONGMSG('This is a test')
where xxxx is a valid E-Mail address.
If no E-Mail message is sent, the problem exists with the system.
The system mail server jobs must be active. Try ending the mail
server jobs with ENDMSF and then restarting with STRMSF. Even though
the STRMSF command may complete normally, there could be messages in
QSYSOPR relating to the problems of an MSF job.
SNDIFSMAIL escape messages you can monitor for
----------------------------------------------
None. Escape messages from based on functions will be re-sent.
SNDIFSMAIL Command parameters *CMD
-----------------------------
SUBJECT The subject of the E-Mail. This information is seen
by the recipient as the subject of the E-Mail.
The subject may be up to 44 characters in length.
The following are valid examples:
a (1 character; no extension)
abcdefgh (8 characters; no extension)
abcdefgh.ijk (8 characters; and an extension)
IFSFILE The name of the IFS file to be sent (2 parts).
The first part must be a directory, a distributed
directory, or a folder. The directory can be a
simple name or a name that is qualified with the
name of other directories. Shortcuts for the
current directory are './' or starting the parameter
with a character other than '/'.
The second part is the object in the directory that
is to be sent. It must be a stream file (*STMF), a
distributed stream file (*DSTMF), or a document
(*DOC).
The following are valid examples to send from the
current directory:
myfile.html
/home/joe/myfile/html
./myfile/html
The following would send from a sub-directory
/dir1/subdir1/myfile.txt
SENDTO The SENDTO parameter allows:
- Sending to a name in the MAILADRP file
- Selection from the MAILADRP file
- Sending to an E-Mail using the INTADR parm
*SELECT is the default which invokes the SELMAILADR
command. This provides a subfile of all names
entered into the MAILADRP file (entered by
WRKMAILADR). After selecting the names to be sent
to using the '1' Option and pressing Enter, the
screen is refreshed to allow more users to be
entered.
An 'X' is displayed in the option column for any
selected entries. You may cancel a previous
selection by entering a blank.
When all names to send to have been selected, F3
should be used to return to the SNDIFSMAIL prompt.
The names of the selected users are used to fill the
SENDTO parameter.
A group name may also be entered (see the discussion
of 'Group names' in the MAILADR tool
documentation).'
When *SELECT is used, the recipient type defaults to
*TO for primary recipient to send to. This value
may be changed at the top of the selection display
to *CC (carbon copy), or *BCC (blind carbon copy).
Each time the Enter key is pressed, the value for
recipient type will be used for those selected
users.
Instead of the default of *SELECT, you may enter a
user name into the first part of the SENDTO
parameter. The name must exist in the MAILADRP file
(note that the E-Mail address is not entered into
the SENDTO parameter).
The second part describes the recipient type. *TO
is the default meaning the user is the primary
recipient.
*CC may be entered meaning the recipient receives a
copy, but is not the primary recipient.
*BCC may be entered meaning the recipient receives a
blind copy and is not identified in the distribution
list.
Up to 50 names may be entered.
An E-Mail address may be entered on SNDIFSMAIL by
using SENDTO(*INT) and then entering the E-Mail
address in the INTADR parameter.
TEXT The text of the message which may be up to 256
bytes. No special characters may be entered to help
format the text.
ADDIFSNAME Whether and how to add the name from the IFSFILE to
the value specified in the TEXT parameter. The
default is *BEGIN.
*BEGIN inserts the file name at the beginning of the
TEXT parameter. For example, if
IFSFILE('/home/joe/myfile.html') and TEXT('Here it
is') is specified, the text read by the recipient
would be:
myfile.html - Here it is
*END inserts the file name at the end of the TEXT
parameter. For example, if
IFSFILE('/home/joe/myfile.html') and TEXT('Here it
is') is specified, the text read by the recipient
would be:
Here it is - myfile.html
*NO may be specified to not add any characters to
the text read by the recipient.
INTADR If SENDTO(*INT) is entered, a list of up to 50
internet addresses may be entered.
A two part parameter is required.
The first part is the E-Mail address (up to 90
bytes).
The second part describes the recipient type. *TO
is the default meaning the user is the primary
recipient.
*CC may be entered meaning the recipient receives a
copy, but is not the primary recipient.
*BCC may be entered meaning the recipient receives a
blind copy and is not identified in the distribution
list.
MAILADRLIB The name of the library where the Mail Address files
exist. *LIBL is the default. A specific library or
*CURLIB may also be entered.
TEST A *YES/*NO option for whether testing is occurring.
*NO is the default meaning an E-Mail will be sent.
*YES may be specified to cause the SNDDST command
that will be used to be logged as a message, but not
run.
Restrictions
------------
The Mail Servers must be active (see the STRMSF command).
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKAPOST Check apostrophe
CHKIFSE Check IFS entry
CHKMAILADR Check mail address
EDTVAR Edit variable
EXTLST Extract list
RSNALLMSG Resend all messages
RSNLSTMSG Resend last message
RTVIFSED Retrieve IFS entry description
RTVMAILADR Retrieve mail address
RTVSPLFA Retrieve spooled file attributes
RTVVALA Retrieve variable attributes
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
SNDLNGMSG Send long message
TRNVAL Translate value
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
SNDIFSMAIL *CMD TAAEMLF QATTCMD
TAAEMLFC *PGM CLP TAAEMLFC QATTCL
|