Retreiving Emails

Discussion in 'Classic ASP' started by rmackay, Aug 25, 2014.

  1. Hi there, I need to be able to retrieve emails from SmarterMail (the email that comes with DASP). They say they have the IPWorks suite installed, but when I try to invoke with:

    Set imap = Server.CreateObject("IPWorksASP.IMAP")
    or
    Set imap = Server.CreateObject("IPWorksASP6.IMAP")

    I get a server create object error. Can someone tell me the correct syntax for creating the IMAP object of IPWorks?

    Thank you - Robert
     
  2. martino

    martino DiscountASP.NET Staff

    mjp likes this.
  3. I hope that it isn't too late to add questions to this post. If DiscountASP has IPWorksASP6.POP installed on the server, why can't we utilize it in order to retrieve emails from a particular eMail address?

    I need to retrieve messages from our main email address where all of the bounced email messages go. I need an easy way to determine invalid eMail addresses that our members have so I can send a notification to someone in control that can fix them.

    Jerry
     
  4. As a PS to my previous post, is there a way that I could produce a console .net application whose main purpose is to retrieve emails from email address x; parse each eMail looking for certain keywords; strip out any eMail addresses found; build a .txt file containing said email addresses?

    I would need a copy of the dll where IPWorksASP6.POP resides so I could include it as a reference in my project.

    I would have to copy the executable into my website's home directory and execute the application via something like this:

    Dim strCommandLine, oShell, oExec, fso, strFileName, fsoForReading, objTextStream
    strCommandLine = "E:\web\<home-directory>\htdocs\parseEmails.exe"

    Set oShell = CreateObject ( "WScript.Shell" )
    If Err.Number <> 0 Then
    strErrorMessage = "Object Creation Error:" & vbCrLf
    strErrorMessage = strErrorMessage & " Error: " & Err.Number & vbCrLf
    strErrorMessage = strErrorMessage & " Error (Hex): " & Hex(Err.Number) & vbCrLf
    strErrorMessage = strErrorMessage & " Source: " & Err.Source & vbCrLf
    strErrorMessage = strErrorMessage & " Description: " & Err.Description & vbCrLf

    Err.Clear ' Clear the Error

    On Error Goto 0

    funcName = strErrorMessage
    Return
    End If

    Set oExec = oShell.Exec ( strCommandLine )

    Set fso = Server.CreateObject("Scripting.FileSystemObject")

    strFileName = "E:\web\<home-directory>\htdocs\parseResults.txt"
    fsoForReading = 1
    Set objTextStream = fso_OpenTextFile ( strFileName, fsoForReading )
    '
    ' Read through the file...
    '
    Set fso = Nothing
     
  5. mjp

    mjp

    I think martino answered that:
    I'm pretty sure the folks at IP*Works! would frown on that. We license most of the components we offer, and as you might expect, those are server licenses which don't generally allow for redistribution.

    It doesn't look like it would work for you anyway, if the Stack Overflow answer is valid (which I assume it is).
     
    martino likes this.

Share This Page