Errors and Warnings

EMAIL returns a value indicating whether or not it ran successfully. A value of zero indicates that EMAIL ran without any errors or warnings. This value is returned in TASKVALUE when EMAIL is invoked directly. The entry points return this value either through a parameter (for EMAIL_LINC) or as the result of the function call (for EMAIL_COB and EMAIL).

EMAIL Errors and EMAIL Warningslist possible error and warning messages you might receive.

Table 21.  EMAIL Errors

Error

Error Value

TASKVALUE

Meaning

ERR_CONFIGURATION

1

3

SMTP or NNTP server domain is not configured

ERR_OPEN

2

5

SMTP or NNTP server failed to open. The number enclosed within parentheses is the OPEN error that can be found in the File Attributes Programming Reference Manual.

ERR_SSLType

7

15

The value of the attribute SSLTYPE is invalid.

ERR_PARAMETER

10

21

Missing or empty parameter

ERR_SYNTAX

11

23

“SEND” or “SUBMIT” required

ERR_OPTION

12

25

Invalid option

ERR_TOODEEP

13

27

Option macros are nested too deeply

ERR_MISSINGQUOTE

14

29

Missing quotation mark

ERR_ADDRESSX

15

31

SEND requires an <address list>

ERR_NEWSGROUPX

16

33

SUBMIT requires a <newsgroup>

ERR_CCSCONFLICT

18

37

The coded character sets specified by HOSTCCS and SERVERCCS are incompatible. Refer to the coded character set mapping tables in the MultiLingual System Administration, Operations,and Programming Guide for compatible pairings.

ERR_WRAP

24

49

Invalid <wrap> specification

ERR_PBHANDLER

25

51

Use the SL command on REDIRSUPPORT to include a PBD file

ERR_USER

30

61

Invalid user

ERR_ALIAS

32

65

Undefined alias

ERR_TIMEOUT

41

83

Server timeout

ERR_RESPONSE

42

85

Unexpected server response

ERR_CLOSETIMEOUT

43

87

Server timed out during a CLOSE or ABORT action

ERR_WRITEERROR

44

89

<server> WRITE failed(<result>), where <server> is either SMTP or NNTP and <result> is the result descriptor in hex (for example, 0201 for EOF)

ERR_EXCEPTION

99

199

EMAIL terminated because of an exception event (HI)


Table 22. EMAIL Warnings

Warning

Warning Value

TASKVALUE

Meaning

ERR_FILETITLE

20

40

File title expected

ERR_FILENAME

21

42

Improper file name

ERR_HOSTNAME

22

44

Improper host name

ERR_FILEAVAILABLE

23

46

File not available

ERR_RETRY

50

100

EMAIL was unable to complete because of a transient error. An automatic retry is scheduled.


A warning indicates either that the message was sent or posted but without the missing file, or that there was a failure due to a transient error and a retry has been scheduled.

EMAIL_LINC returns the error value in the first three characters of the global parameter and the warning value in the second three characters. All other methods return the value (as shown below), for both errors and warnings, as a REAL variable:

[7:7] Error or warning value [0:1] Set if an error occurred

As an example, if an undefined alias error (ERR_ALIAS=32) occurred, EMAIL_LINC returns a “032” in the first three characters of the global parameter. The value returned by the other methods is 65 (consisting of 32 in bits [7:7] and a 1 in the error bit [0:1]). For a file not available, EMAIL_LINC returns a “000” in the global parameter (because it is only a warning) and the other methods return a value of 46 (0 and 23 [7:7]).

When an error occurs, EMAIL creates a printer backup TASKFILE that contains a trace of the transactions between it and the server. This file can be useful in determining what went wrong.