ASPPop3 (Server Objects) fails to return email details

R

Rich_C

Can anyone tell me why this code doesn't work? The original came from
an example in this group, but was modified slightly when the original
failed to return message details.

I am able to connect to the server and see the number of messages on
the server, but message details (sender, subject, body, etc.) are not
returned.

_______________
Dim Mailer
Set Mailer = Server.CreateObject("POP3svg.Mailer")
Mailer.RemoteHost = "mail.xxxx.com"
Mailer.UserName = "(e-mail address removed)"
Mailer.Password = "pwd"
Mailer.OpenPop3
Dim iMessages
iMessages = Mailer.MessageCount
Response.Write "There are " & iMessages & " messages on the
server.<p>"

Dim iLoop

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

For iLoop = 1 to iMessages
'If Mailer.Retrieve(iLoop) then
Mailer.Retrieve iloop

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

Response.Write "</table>"

Mailer.ClosePop3
 
R

Rich_C

Thanks Dave -
Even if I only try to display one part of the email (Subject, FromName,
etc.) nothing is returned.
 
B

Bob Lehmann

Did you look at the HTML, as Dave suggested? Or, are you assuming nothing
was returned because you don't see it on the page?

Bob Lehmann
 
R

Rich_C

I looked at the HTML. View Source for the page shows:
_____________________
<html>
<head>
<head>
<body>

There are 18 messages on the server.<p><table border=1 align=center
cellspacing=1><tr><th>&nbsp;</th><th>Subject</th><th>From</th></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
</body>
</html>
_____________________
This may not correspond exactly to original code as I've been working
on it since posting.
 
R

Rich_C

I hate to revisit this old issue, but I have a question about how mail
servers assign email IDs. This script attempts to retrieve mail with
ID 1 to n with n being the number of messages on the server for the
account.

Can anyone tell me how Email IDs are assigned? Is it likely that the
first message isn't number 1 and therefore my script returns nothing?
If this is the case, is it possible to determine which email IDs are in
the mailbox so they can be retrieved?

If it makes a difference, the account in question is on a shared server
and the script does not produce any errors when it runs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top