Why this code cant work ????

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2006
Posts: 2
Reputation: ray_fighter is an unknown quantity at this point 
Solved Threads: 0
ray_fighter ray_fighter is offline Offline
Newbie Poster

Why this code cant work ????

 
0
  #1
Apr 3rd, 2006
hi .... i have tried to use this code but it juz cant work ... i cant find out the problem with this code ... this program is suppose to read my email and display all my messages that i have in my inbox. Can anyone help me with this ??? Thanx alots !! i'am stilll a noob in this.... haha juz started it like one month ago ...

<%
'Open a connection to the POP3 server
Dim Mailer
Set Mailer = Server.CreateObject("POP3svg.Mailer")
Mailer.RemoteHost = "mail.hotmail.com"
Mailer.UserName = "raynertengjinsheng"
Mailer.Password = "qwerty"
Mailer.OpenPop3

'Find out how many messages there are
Dim iMessages
iMessages = Mailer.MessageCount
Response.Write "There are " & iMessages & " messages on the server.<p>"


Dim iLoop

'Display the table
Response.Write "<table border=5 align=center cellspacing=5>"
Response.Write "<tr><th>&nbsp;</th><th>Subject</th><th>From</th></tr>"

'Loop through all of the available messages
For iLoop = 1 to iMessages
If Mailer.Retrieve(iLoop) then
Response.Write "<tr>"
Response.Write "<td><a href=""readMessage.asp?ID=" & _
iLoop & """>Read</a></td>"
Response.Write "<td>" & Mailer.Subject & "</td>"
Response.Write "<td>" & Mailer.FromName & " (<a href=""mailto:""" & _
Mailer.FromAddress & """>" & Mailer.FromAddress & _
"</a>)</td>"
Response.Write "</tr>"
End If
Next 'iLoop

Response.Write "</table>"

'Close the connection to the POP3 server
Mailer.ClosePop3
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 206
Reputation: plazmo is an unknown quantity at this point 
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Re: Why this code cant work ????

 
0
  #2
Apr 3rd, 2006
im sure you are getting an exception, and that is classic asp so i dont exactly know what it does on a error. but you could put a try catch around it and print the error on the page. or step thru the code till it hits an error.
you probably are not authing right. or hotmail probably uses excange servers, in which case im not sure if pop works
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC