473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASPPop3 (Server Objects) fails to return email details

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 = "te**@xxxx.com"
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

Jul 31 '05 #1
6 2180
Rich_C wrote:
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.
POP3svg.Mailer is not part of ASP, so if the problem is with that interface,
this is probably the wrong forum.

Beyond that, I have an observation and a question. First, the observation.
It appears you are breaking your HTML in this line:
Response.Write "<td>" & Mailer.FromName &_
" (<a href=""mailto:""" & Mailer.FromAddress &_
""">" & Mailer.FromAddress & "</a>)</td>"


The resulting ouput will be something like this:

<td>Rich_C (<a href="mailto:"Ri****@xxx.com">
FromAddress</a>)</td>

In other words, you have an extra quote between the mailto: and the address.

My question is: Are you certain the message details are not returned? Have
you looked at the HTML generated by this script, or merely at the browser's
interpretation of your broken HTML?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 31 '05 #2
Thanks Dave -
Even if I only try to display one part of the email (Subject, FromName,
etc.) nothing is returned.

Jul 31 '05 #3
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" <Ri********@aol.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Thanks Dave -
Even if I only try to display one part of the email (Subject, FromName,
etc.) nothing is returned.

Jul 31 '05 #4
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.

Jul 31 '05 #5
[Please quote if you want further responses]

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


I can only assume the problem is with the POP3svg.Mailer object, which is
beyond the scope of ASP.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 31 '05 #6
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.

Aug 8 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
12
by: Egil M?ller | last post by:
Is there any way to create transparent wrapper objects in Python? I thought implementing __getattribute__ on either the wrapper class or its metaclass would do the trick, but it does not work for...
2
by: Matt | last post by:
I'm new to Java but experienced with PL/SQL. I've found what appears to be strange behaviour (a bug?) when attempting to create java stored objects using the UNIX version of Oracle SQL*PLUS...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
5
by: George Copeland | last post by:
This is a request for help fixing a SQL Server 2000/ADO problem on Windows XP. I would appreciate any useful assistance. PROBLEM: SQL Server access on my machine fails as follows: 1. All of...
6
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
2
by: Vadim Malishev | last post by:
Hello, Can anybody help to solve the following problem? My Windows Service trying to access remote machine to get WindowsDirectory Property over Win32_OperatingSystem WMI class. Both servers...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.