SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member Smashgorand's Avatar
    Join Date
    Mar 2001
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CDONTS - remote e-mail ???

    Hey all

    Does anyone have an idea on how to get CDONTS to connect to a remote e-mail address / inbox ? I'm running on Win2K IIS 5.0 using CDONTS. I can access the "inbox" on my Win2K machine, but would like to connect to and read the "inbox" of one of my other POP3 accounts under a different domain.

    Anyone know how to have CDONTS connect to a remote POP3 account ? (If possible)

    Thanx

  2. #2
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm... i dont think ull be able to dowhat u want with CDONTS, but u might be able to do it withe the M$ XML Engine, which comes with IIS i think... it might work if ur mail server uses cookies and stuff... i could try writing a script for you to do it if u want

  3. #3
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI,

    I found this little script in my archive of code samples, never tired it but might be what your looking for

    <%
    'logon to SMTP service
    Set mysession = server.createobject("CDONTS.Session")
    mysession.logonSMTP "administrator" , _
    "administrator@yourdomain.com"

    'get a reference to the inbox folder
    Set myinbox = mysession.inbox

    'create an object that represents all the messages
    'in the inbox
    Set mymessages = myinbox.messages

    'retrieve the mail from the object constructed above

    For k = 0 to mymessages.count

    Set mymessage = mymessages.item(k)

    'get the sender name
    Response.write "From: " & mymessage.sender & "<br>

    'get the mail message
    Response.write "Subject: " & m ymessage.subject _
    & "<br>"

    'get the mail text
    Response.write mymessage.text & "<br>"

    Next

    'logoff from the session
    mysession.logoff
    Set mysession = nothing
    %>
    .NET Code Monkey


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •