| | |
Why this code cant work ????
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Solved Threads: 0
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> </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
<%
'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> </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
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
you probably are not authing right. or hotmail probably uses excange servers, in which case im not sure if pop works
![]() |
Similar Threads
- How to Enable/Disable Users thro' C++ or any code (C++)
- Do you listen to music while you code/design/work? (Geeks' Lounge)
- Null Pointer? will this code work (C)
- CSS code for borders does not work (HTML and CSS)
- Converting from VB code to C (C)
- stdin.readlin() doesn't want to work ? (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: Drop down box not working
- Next Thread: ASP.Net Security 101 Part 1
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# c#gridviewcolumn cac checkbox click commonfunctions confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dialog dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





