Difference between revisions of "MAILHEADER()"

From Lianjapedia
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
The MAILHEADER() function will return the specified header information from an array that was already created by MAILREAD().  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.
 
The MAILHEADER() function will return the specified header information from an array that was already created by MAILREAD().  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.
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
!Parameters||Required||Default||Description
+
!width="15%"|Parameters||width="15%"|Required||Width="15%"|Default||Description
 
|-
 
|-
|<array1>||Yes||None||The name of an array to contain the mail messages read by MAILREAD()
+
|valign="top"|<array1>||valign="top"|Yes||valign="top"|None||The name of an array to contain the mail messages read by MAILREAD()
 
|-
 
|-
|<expC2>||Yes||None||Specify the header information to return from the mail message.  This can be any one of the following options:
+
|valign="top"|<expC2>||valign="top"|Yes||valign="top"|None||Specify the header information to return from the mail message.  This can be any one of the following options:
 
"RECEIVED"
 
"RECEIVED"
 
"RETURN-PATH"
 
"RETURN-PATH"
Line 36: Line 36:
 
         30
 
         30
 
? mailheader(mail_mes, "FROM")
 
? mailheader(mail_mes, "FROM")
sales@recital.com
+
sales@lianja.com
 
</code>
 
</code>
  
Line 42: Line 42:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Mail Functions]]
 
[[Category:Mail Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 13:16, 19 May 2014

Purpose

Function to return specified header information

Syntax

MAILHEADER(<array1>, <expC1>)

See Also

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

Description

The MAILHEADER() function will return the specified header information from an array that was already created by MAILREAD(). 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
<array1> Yes None The name of an array to contain the mail messages read by MAILREAD()
<expC2> Yes None Specify the header information to return from the mail message. This can be any one of the following options:

"RECEIVED" "RETURN-PATH" "MESSAGE-ID" "FROM" "TO" "SUBJECT" "DATE" "STATUS"

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

Example

number = mailread(1, "mail_mes")
? number
        30
? mailheader(mail_mes, "FROM")
sales@lianja.com