TAA Tools
SNDTXTMAIL      SEND TEXT E-MAIL                       TAAEMLC

The Send  Text  E-Mail command  sends a  text  message 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 command for sending  an E-Mail with an
attached spooled file.

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 SNDTXTMAIL command would be:

             SNDTXTMAIL   SENDTO(JONES)
                            SUBJECT('New mail concept')
                            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
text message.

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
SNDTXTMAIL  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'.

A logging  function also  exists to  log the  E-Mails  that were  sent.
See the 'Mail Logging' section of the MAILADR tool documentation.

To  send  a  text  message  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:

          SNDTXTMAIL  SUBJECT(xxx) TEXT('...') SENDTO(*INT)
                        INTADR(www@xxx.zzz)

Troubleshooting
---------------

If the SNDTXTMAIL 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 SNDTXTMAIL  command completes  normally, but  no E-Mail  message
arrives at  the destination, try  SNDDST by itself  (SNDTXTMAIL 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.

SNDTXTMAIL escape messages you can monitor for
----------------------------------------------

      TAA9891    The user name does not exist.

Escape messages from based on functions will be re-sent.

SNDTXTMAIL Command parameters                         *CMD
-----------------------------

   SUBJECT       Up to  44 bytes may  be entered to  describe a subject
                 of the text.

   TEXT          The  text  of  the message  which  may be  up  to 4800
                 bytes.

                 Special characters  may be entered  (must be in  upper
                 case) to help format the text:

                      :/N Causes a new line (Carrier return).

                      :/P Causes a blank line and then a new line.

   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 SNDTXTMAIL  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  SNDTXTMAIL by
                 using  SENDTO(*INT)  and  then  entering   the  E-Mail
                 address in the INTADR parameter.

   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.  See  the MAILADR  tool
                 for how to create the Mail Address files.

   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.   The MAILLOGP  file will  be updated if  logging
                 is set on.


Restrictions
------------

The Mail Servers must be active (see the STRMSF command).

Prerequisites
-------------

The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     EXTLST          Extract list
     RSNALLMSG       Resend all messages
     RSNLSTMSG       Resend last message
     RTVMAILADR      Retrieve mail address
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDLNGMSG       Send long message

Implementation
--------------

You must  have a MAILADR file created with the  user names that will be
used by SNDTXTMAIL.

The mail servers must be active (see the STRMSF command).

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   SNDTXTMAIL    *CMD                   TAAEMLC       QATTCMD
   TAAEMLCC      *PGM       CLP         TAAEMLCC      QATTCL
					

Added to TAA Productivity tools May 15, 2008


Home Page Up to Top