* This is the modus mailing list *

Maybe Vircom will give us some hints on how to use the
VopWeb.ReleaseEncrypted function?...

Regis

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Antonio Giannetto
Sent: Thursday, December 18, 2003 5:12
To: [EMAIL PROTECTED]
Subject: [Modus] Custom ASP Page for Release Message from quarantine


* This is the modus mailing list *

Dear All,

i've tried the code that Suneel suggested us.

All is working fine only for mailbox hosted on the server,
but for customer that are using ETRN service this solutions
can't work.

The problem is on the VopMailWeb.MailSession object that need a valid
user/password conbination to connect to the quarantine folder.

I've tried to release other user message using the postmaster account
(binding
the Object to this account, and the postmaster receive the released message.

Has Anyone found a solution to use the function VopWeb.ReleaseEncrypted?

This function do not require binding on the mailbox.

Thanks in advance,
Antonio

----Suneel TestCode.asp-----

<%
Option Explicit

'=================================
' Start a Mail Session for a user

Dim VopWeb
Set VopWeb = Server.CreateObject("VopMailWeb.MailSession")
If Not IsObject(VopWeb) Then
        ' Error instantiating the the VOPWeb Object
  Else
        VopWeb.OpenMailSession

        VopWeb.Authenticate "[EMAIL PROTECTED]", "password"
        Select Case Err.number
                Case &H00000000
                        ' Login successfull
                Case &H80060003
                        'Error Login Failed
                Case &H80040032
                        'Error IMAP4 Not Supported
                Case &H800406BA OR &H800406BF
                        'Error Server Not Available
                Case Else
                        ' Other Error
        End Select
End If
'=================================


'=================================
' Create a Folder object and set it to the quarantine
Dim tmpFolder,QuarantineFolderID,QuarantineFolder

For Each tmpFolder In VopWeb.Folders
        If tmpFolder.Type = 9 Then 'FOLDER_QUARANTINE
                QuarantineFolderID = tmpFolder.ID
                Set QuarantineFolder = tmpFolder
                Exit For
        End If
Next
'=================================


'=================================
' Loop through all messages in the Quarantine Folder ' Use the block above
to set the Quarantine Folder

QuarantineFolder.Sync(True)

QuarantineFolder.Envelopes.GetEnvelopeList QuarantineFolder.EnvelopesCount,
"" , 0

Dim  MessageSortOrder
MessageSortOrder = QuarantineFolder.Envelopes.SortOrder

Dim CurrentMessage,CurrentIndex,CurrentMessageID,Status

Dim Subject, Recipients, From, Date, Size, QuarantineCategory, Priority

For CurrentIndex = 1 to QuarantineFolder.Envelopes.Count

        set CurrentMessage = QuarantineFolder.Envelopes.Item(CurrentIndex)
        CurrentMessageID = CurrentMessage.MessageID

        ' Following are some properties for the CurrentMessage

        Status = CurrentMessage.Status
        ' 0 = Unread
        ' 1 = Read
        ' 2 = Replied
        ' 3 = Forwarded
        ' 4 = Deleted

        Subject = CurrentMessage.Subject
        Recipients = CurrentMessage.FormattedTo
        From = CurrentMessage.FormattedFrom
        Date = CurrentMessage.Rfc822Date
        Size = CurrentMessage.FormattedSize
        QuarantineCategory = CurrentMessage.Category
        Priority = CurrentMessage.Priority

        Response.Write CurrentIndex & "-" & CurrentMessageID & "-" & Subject

        If Instr(Subject,"Test")>0 then
                ' Release a message based on the MessageID

                QuarantineFolder.Envelopes.ReleaseMessage CurrentMessageID

                Response.Write " - <B>released</B>"


        End if

        Response.Write  "<BR>"
Next

QuarantineFolder.Sync(True)


'=================================
' Close a Mail Session
If IsObject(VopWeb) Then
        VopWeb.CloseMailSession
        Set VopWeb = Nothing
End If
'=================================
%>


**
To unsubscribe, send an Email to: [EMAIL PROTECTED]
with the word "UNSUBSCRIBE" in the body or subject line.



**
To unsubscribe, send an Email to: [EMAIL PROTECTED]
with the word "UNSUBSCRIBE" in the body or subject line.

Reply via email to