Solved

ASPPop3 Component by ServerObjects

Posted on 2004-04-28
19
341 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
 
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now