ASPPop3 (Server Objects) fails to return email details

Discussion in 'ASP General' started by Rich_C, Jul 31, 2005.

  1. Rich_C

    Rich_C Guest

    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 = ""
    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
    Rich_C, Jul 31, 2005
    #1
    1. Advertising

  2. Rich_C

    Rich_C Guest

    Thanks Dave -
    Even if I only try to display one part of the email (Subject, FromName,
    etc.) nothing is returned.
    Rich_C, Jul 31, 2005
    #2
    1. Advertising

  3. Rich_C

    Bob Lehmann Guest

    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

    "Rich_C" <> wrote in message
    news:...
    > Thanks Dave -
    > Even if I only try to display one part of the email (Subject, FromName,
    > etc.) nothing is returned.
    >
    Bob Lehmann, Jul 31, 2005
    #3
  4. Rich_C

    Rich_C Guest

    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.
    Rich_C, Jul 31, 2005
    #4
  5. Rich_C

    Rich_C Guest

    Re: ASPPop3 (Server Objects) fails to return email details (Revisited)

    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.
    Rich_C, Aug 8, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Show Details/Hide Details link button

    =?Utf-8?B?Sm9l?=, Mar 13, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    883
    dkode
    Mar 13, 2006
  2. Jon
    Replies:
    2
    Views:
    334
    =?Utf-8?B?R3VmZmE=?=
    Apr 21, 2006
  3. =?Utf-8?B?QmlzaG95?=
    Replies:
    1
    Views:
    294
    Mark Fitzpatrick
    Dec 24, 2006
  4. Greenhorn
    Replies:
    15
    Views:
    782
    Keith Thompson
    Mar 6, 2005
  5. Don Grover

    return session details

    Don Grover, Oct 11, 2003, in forum: ASP General
    Replies:
    1
    Views:
    106
    Chris Hohmann
    Oct 12, 2003
Loading...

Share This Page