ActiveX: SLPOP (Filename: SLPOP3.OCX)
![]()
| SLPOP is an ActiveX control that can be used to download e-mail messages (or just the message headers) from a POP3 server. The control can also check the number of waiting mails on the server and their sizes. SLPOP uses the POP3 protocol (specified in RFC 1939) when communicating with the mail server. |
Properties
| Name | Type | Description |
| MailBody | String | This property will contain the
body text for a downloaded mail. |
| MailFrom | String | This property will contain the
sender's e-mail address of a downloaded mail. This property will also
obtain a value if you call the GetMailHeader method. |
| MailHeader | String | This property will contain the
mail header of a downloaded message. This property will also obtain a value
if you call the GetMailHeader method. |
| MailPort | Long | Specifies the port number to use
when connecting to the POP3 server. The default value for this property is
110 and normally you never need to change the value. |
| MailReplyTo | String | This property will contain the
sender's reply e-mail address of a downloaded mail. This property will
also obtain a value if you call the GetMailHeader method. |
| MailServer | String | Specifies the POP3 server to use
when downloading e-mails. |
| MailSubject | Long | This property will contain the
subject field of a downloaded message. This property will also obtain a
value if you call the GetMailHeader method. |
| Password | String | Specifies the password to use
when connecting to the POP3 server. |
| UseLog | Boolean | Enables/disables using of a log
file in the control. If this property has the value True a log file
with the filename SLPOP3AX.LOG will be created. This
log file contains detailed information about the POP3 communication
between the client and the mail server. In Windows XP and earlier the log file is stored in the Windows folder. In Windows Vista the log file is stored in the following folder: \Users\<User>\AppData\Roaming\SamLogic\Log Files |
| UserName | String | Specifies the user name to use
when connecting to the POP3 server. |
Events
| Name | Description |
| Connected | This event is fired when a
connection to the POP3 server is established. |
| Disconnected | This event is fired when the
connection to the POP3 server is disconnected. |
| ErrorOccured | This event is fired if an error
occurs when communicating with the POP3 server. |
| MailHeaderReceived | This event is fired when an
e-mail message header have been successfully downloaded using the GetMailHeader
method. |
| MailReceived | This event is fired when an
e-mail have been successfully downloaded using the ReceiveMail
method. |
| MailServerReportedError | This event is fired if the mail
server reports an error or denies access. The Operation
parameter
specifies at what step in the communication process the error occurred.
Some common values for Operation is: 1 = The error occurred when the user name was sent. 2 = The error occurred when the password was sent. 5 = The error occurred when the e-mail message header was downloaded. 7 = The error occurred when the e-mail was downloaded. |
| MailSizeReceived | This event is fired when the
size of a mail have been retrieved using the GetMailSize
method. |
Methods
|
Disconnect () As
Boolean |
Break () Cancels current operation. This method can be used to break the connection if the mail server is not responding in a given amount of time. Delete
(MailNumber As Integer) As Boolean GetLastError
() As Long GetLastReplyCode
() As Long GetMailHeader
(MailNumber As Integer) As Boolean GetMailSize (MailNumber
As Integer) As Boolean GetNumWaitingMails
() As Integer GetSizeWaitingMails
() As Integer ReceiveMail
(MailNumber As Integer) As Boolean |
Example
Click here for an example of how to use the SLPOP
ActiveX
![]()