Difference between revisions of "READMAIL()"

From Lianjapedia
Jump to: navigation, search
Line 13: Line 13:
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
 
!width="15%"|Parameters||width="15%"|Required||width="15%"|Default||Description
 
!width="15%"|Parameters||width="15%"|Required||width="15%"|Default||Description
|-
 
|valign="top"|<expN>||valign="top"|Yes||valign="top"|None||Numeric value specifying the mail message to read
 
 
|-
 
|-
 
|valign="top"|<expC1>||valign="top"|Yes||valign="top"|None||The name of the array to be created to contain the lines of the mail message
 
|valign="top"|<expC1>||valign="top"|Yes||valign="top"|None||The name of the array to be created to contain the lines of the mail message
Line 23: Line 21:
 
"BODY"
 
"BODY"
 
"ATTACHMENT"
 
"ATTACHMENT"
 +
|-
 +
|valign="top"|<expN>||valign="top"|Yes||valign="top"|None||Numeric value specifying the mail message to read
 
|-
 
|-
 
|}
 
|}

Revision as of 05:38, 30 April 2013

Purpose

Function to read the specified mail message

Syntax

READMAIL(<expN>, <expC1>, [ ,<expC2>])

See Also

CLOSEMAIL(), COUNTMAIL(), DELETEMAIL(), MAILATTACH(), MAILCLOSE(), MAILCOUNT(), MAILDELETE(), MAILERROR(), MAILHEADER(), MAILNODENAME(), MAILOPEN(), MAILREAD(), MAILSAVEAS(), MAILSEND(), MAILUSERNAME(), OPENMAIL(), SENDMAIL()

Description

The READMAIL() function will read the mail message specified by the number <message>, returning the number of elements in the array that it creates. If you are not connected to a mail server, it will return an error. You can use the MAILUSERNAME() or MAILNODENAME() function to check if you are connected.

Parameters Required Default Description
<expC1> Yes None The name of the array to be created to contain the lines of the mail message
<expC2> No "ALL" The text that will be read from the mail message. This can be any one of the following:

"ALL" "HEADER" "BODY" "ATTACHMENT"

<expN> Yes None Numeric value specifying the mail message to read

The MAILERROR() function can be used to return the error message if the READMAIL() fails.

Example

number = readmail(1, "mail_mes", "BODY")
? number
        30
? mail_mes[30]
This is the last line in the mail message.