Tag Link | [Email_POP] | Category | |
---|---|---|---|
Type | Substitution | Source Available | Yes |
Support | Preferred | Version | 8.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LDML | Sets | Lasso 8.5, Lasso 8.0 |
[Email_POP] allows a POP connection to be opened to a remote mail server. The type instance represents the POP connection and the member tags allow different operations to be performed on the POP server.
The tag should be called with a
The default port is 110 or a different port can be specified using an optional
The [Email_POP] type allows the [Email_POP->Get] tag to be customized so that [Iterate] ... [/Iterate] will perform the desired operation automatically. By default [Email_POP->Get] is set to get the Unique ID of the current message. It can also be set to 'retrieve' the current message, 'delete' the current message, get just the 'headers' for the current message or get the first 'top#' lines of the message.
Once the POP connection has been established [Email_POP->Size] reports how many messages are waiting on the server. [Email_POP->Retrieve] can be used to fetch a message by position (and an option second parameter specifies the maximum number of lines to retrieve). [Email_POP->Headers] can be used to fetch the headers a message by position. [Email_POP->Delete] can be used to delete a message by position. And, [Email_POP->UIDL] can be used to return the unique ID of a message by position. The individual messages are usually passed into [Email_Parse] for further processing
Alternately, [Iterate] ... [/Iterate] can be used to cycle through all the available messages on the POP server. The operation specified in the
Finally, the [Email_POP->Close] tag should be used to close the connection with the remote host. Any pending deletes will be performed when the connection is closed. The [Email_POP->Cancel] tag can be used to close the connection without performing any pending deletes.
Some additional tags provide debugging information. [Email_POP->LastError] returns the last error message received by the type. [Email_POP->Errors] returns an array of all error messages received by the type. [Email_POP->Results] returns an array of all results received by the type (errors and success reports).
[Var: 'myPOP' = (Email_POP:
[Iterate: $myPOP, (Var: 'ID')]
[Var: 'Msg' = (Email_Parse: $myPOP->Retrieve)]
[$myPOP->Delete]
... Process Message ...
[/Iterate]
[$myPOP->Close]
Optional Parameters | |
---|---|
-Host | The host name or IP address of the POP server. |
-Port | The port for the POP server (defaults to 110). |
-Username | The username for an account on the POP server. |
-Password | The password for the account on the POP server. |
-APOP | If supported by the server, APOP authentication is used by default. Set this parameter to false to disable APOP. |
-Get | The action to perform when ->Get is called. Defaults to UIDL. Can be set to retrieve, delete, headers, or top#. |
-Timeout | The timeout for the POP server in seconds (defaults to 15). |
-Log | Set to true for detailed logging. |
See the Lasso 8 Language Guide for examples of how to use this tag.