%
'create our variables
Dim cdoSession , strMessage , strMessages , objInbox , intMsgID
'create an instance of the CDONTS.Session object
Set cdoSession = Server.CreateObject("CDONTS.Session")
'this is your logon details
cdoSession.LogonSMTP "password" , "email@youraddress.com"
'open the inbox folder
Set objInbox = cdoSession.Inbox
'retrieve the messages collection
Set strMessages = objInbox.Messages
intMsgID = Trim(Request.QueryString("MsgId"))
If ("" = intMsgID Or Not IsNumeric (intMsgID)) Then
'display all the messages
For Each strMessage in strMessages
i = i + 1
Response.Write "" & strMessage.Subject
Response.Write ""
Response.Write " sent by : " & strMessage.Author
Response.Write "
"
Next
Else
Set strMessage = strMessages(intMsgID)
Response.Write "Subject : " & strMessage.Subject & "
"
Response.Write "Sender : " & strMessage.Sender & "
"
Response.Write "Message : " & strMessage.Text
End If
'log off from the session
cdoSession.LogOff
%>