Solved

ASPPop3 Component by ServerObjects

Posted on 2004-04-28
19
347 Views
Last Modified: 2008-01-09
I purchased the ASPPop3 component today, but the guy doesn't seem to be responding to my help emails.  This is urgent so I thought I'd post it on here hoping somebody would know.

Here is my script
------------------------
Dim Mailer
Set Mailer = Server.CreateObject("POP3svg.Mailer")
Mailer.RemoteHost = "mail.domain.com"
Mailer.UserName = "user@domain.com"
Mailer.Password = "xxxxx"
Mailer.OpenPop3
Mailer.Pop3Log = "C:\ASPPop3\PopLog.txt"

if Mailer.GetPopHeaders then
infoArr = Mailer.MessageInfo
      for i = 1 to Mailer.MessageCount
            Response.Write Mailer.Retrieve(i) & "<br />"
            if Mailer.Retrieve(i) then
                   Response.Write "Retrieved!"
            end if
       next

My problem is that Mailer.Retrieve(i) is returning False!  So it's not retrieving the message I guess.  The component has been installed and registered with him.  What's wrong??
0
Comment
Question by:BeamerCola
  • 6
  • 6
  • 5
  • +1
19 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10944496
Are you certain that this is an array?

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10944502
I mean, try this:

<%
if Mailer.GetPopHeaders then
   infoArr = Mailer.MessageInfo
   for i=0 to UBound(infoArr)  
      response.write(infoArr(i) & "<BR>")
   next
end if
%>
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10944561
Try this code..

<%
  'Open a connection to the POP3 server
  Dim Mailer
  Set Mailer = Server.CreateObject("POP3svg.Mailer")
  Mailer.RemoteHost = "pop3.foo.com"
  Mailer.UserName   = "username"
  Mailer.Password   = "password"
  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=1 align=center cellspacing=1>"
  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
%>


Cheers!!
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 21

Expert Comment

by:ap_sajith
ID: 10944585
You can find more reference material at http://www.serverobjects.com/comp/Asppop3.htm

Cheers!!
0
 

Author Comment

by:BeamerCola
ID: 10945293
Fritz:
I gave that a shot and it didnt work too well.  I'm using it the same way the instructions told me to, and it just plain doesnt seem to be working.

ap:
I tried that example from 4guys and have been following the guide on serverobjects to the T ... but it still refuses to work correctly!!

I wasnt sure if somebody out there that uses this component knows exactly whats going on or somthing.

hrumph,
Beamer
0
 

Author Comment

by:BeamerCola
ID: 10945327
By the way... this pulls in the correct amount of messages.. it's connecting fine.. but when i do

Response.Write Mailer.Retrieve(1)

It should display a value of "True" that it actually Retrieved it ... but instead it gives False.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10945359
The point that I was making was the following...

If this doesn't work:

<%
if Mailer.GetPopHeaders then
   infoArr = Mailer.MessageInfo
   for i=0 to UBound(infoArr)  
      response.write(infoArr(i) & "<BR>")
   next
end if
%>

then infoArr is not really an array and everything else will not work then.

FtB

0
 

Author Comment

by:BeamerCola
ID: 10945402
the infoArr variable I set is actually something kind of old which is commented out of the code as of now.  I'm not looping with the uBound of infoArr ... so it's just kinda sitting there now.  Though I commented it out and still no luck.
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10946824
Try configuring the pop3 email address in outlook and see if it works correctly. Maybe your server settings is wrong!(you never know!).

What does Mailer.MessageCount retrieve?. Could you try it on your local server so that you know that it is not a server issue.

Cheers!!
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10950248
What if you do this:

for each objMessage in Mailer.Retrieve
  response.write(Mailer.Retrieve(objMessage) & "<BR>")
next


0
 

Author Comment

by:BeamerCola
ID: 10950646
ap-
I have it configured in Outlook and its working good ... Mailer.MessageCount pulls in the correct amout of messages

fritz-
"Wrong number of arguments or invalid property assignment: 'Retrieve'"
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10972847
Fine with me, but it wouldn't hurt to give Sajit the points for effort...

FtB
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10983761
It's Ok with me as long as BeamerCola posts he he overcame this issue.

@Fritz, Thanks for the tip mate!

Cheers!!
0
 

Author Comment

by:BeamerCola
ID: 10986956
Well I originally closed this question because it didnt look like it was going to be figured out, by me or anybody.  And that guy sure wasn't emailing me back.

So last night I heads-downed it and figured it out!

I needed to change around how it opened and closed the Pop3 connection

Dim Mailer
Set Mailer = Server.CreateObject("POP3svg.Mailer")
Mailer.RemoteHost = "mail.trnsfr.com"
Mailer.UserName = "in@mo.blogpod.com"
Mailer.Password = "snuffaluff"
Mailer.MailDirectory = "C:\Websites\Moblog\images"

      for i = 0 to Mailer.MessageCount
            Mailer.OpenPop3
            Mailer.Retrieve i
            Mailer.ClosePop3
            Mailer.GetPopHeader i
            if Mailer.GetHeaderField("To") <> "" then
            Call GetUserInfo(Mailer.GetHeaderField("To"))
            Call DisplayInfo
            attCount = Mailer.AttachmentCount
       next

thanks for all your help
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10987313
Thats Crazy!!.. Call the open method in a loop??.. The guys who wrote the component needs to think again on this issue ;o)

Cheers!!
0
 

Author Comment

by:BeamerCola
ID: 10987421
Haha yeah, a little screwy.
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10987466
You can pass on my comments when you call up support next time! ;o)

Cheers!!
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 11005811
Closed, 500 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question