Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 JMail:POP3 - Get Your Emails
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 03 November 2001 :  02:21:04  Show Profile
I found this script at aspemporium. Pretty easy to set up


<%
GetPopMail "USERNAME", "PASSWORD", "pop.mail.yahoo.com", 110, false
%>

<%
Function GetPopMail(ByVal usr, ByVal pass, ByVal mailserver, _
ByVal mailport, byVal bShowHeaders)
'declare variables
Dim pop, headers, i, messages, ct, message
'create jmail pop3 object
Set pop = CreateObject("JMail.POP3")
'connect to account
pop.Connect usr, pass, mailserver, mailport
'download mail headers
pop.DownloadHeaders
'download mail messages
pop.DownloadMessages
'get handle to the messages object
Set messages = pop.Messages
'count of messages retrieved
ct = messages.count - 1
'if there's messages...
if ct >= 1 then
'loop through messages
for i = 1 to ct
'get handle to message object
Set message = messages.item(i)
'show headers or whole email...
if bShowHeaders then
'print header
Response.Write( message.Text & "<BR><BR>")
else
'print subject and body
Response.Write( "<B>" & _
message.subject & "</B><BR>" )
Response.Write( message.body & _
"<BR><BR>" )
end if
'free message handle
Set message = nothing
next
else
'no messages
Response.Write( "no messages on " & mailserver )
end if
'disconnect from server
pop.disconnect
'release messages handle
Set messages = Nothing
'free jmail pop3 object
Set pop = Nothing
End Function
%>


GauravBhabu
There is only one miracle...That is LIFE! | It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 03 November 2001 :  02:48:32  Show Profile
This one does a little more:

http://www.net-language.com/ProcessShowCode.asp?i=322

I had never looked into JMail's POP3 retrieval capabilities. The manual that comes with it explains all of the things it can do, interesting reading.
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 03 November 2001 :  14:28:32  Show Profile
Anybody know how to code the SaveToStream method on the message object?


======
Doug G
======
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07