Xbasic
EMAIL_GET_FIELD Function
Syntax
Data as C = EMAIL_GET_FIELD( Header as C, Field as C )
Arguments
- HeaderCharacter
The header to be parsed.
- FieldCharacter
The field to retrieve. The following is a sample of supported field values:
- To:
- Message-ID:
- Subject:
- MIME-Version:
- Date:
- Content-Type:
- Organization:
- Importance:
Returns
- DataCharacter
Returns the text content of the select header field.
Description
The EMAIL_GET_FIELD() function returns a field from the header of an email message.
Example
DIM pSocket as P ? email_pop_open(pSocket, "mail.mycompany.com", "john_doe", "sneaky") = .T. headers = email_pop_headers(pSocket, 3) ? a5_email_get_field(headers, "Subject:") = "How are you?"
See Also