SMTP sink problem - Microsoft Exchange

This is a discussion on SMTP sink problem - Microsoft Exchange ; I have a strange problem on Exchange 2003. I registered SMTP sink on incoming email. First I tested it with small vbscript event handler (createfile.vbs) that simply creates a file on the server. Everything worked fine. Then I tried to ...

+ Reply to Thread
Results 1 to 2 of 2

SMTP sink problem

  1. Default SMTP sink problem

    I have a strange problem on Exchange 2003.

    I registered SMTP sink on incoming email. First I tested it with small
    vbscript event handler (createfile.vbs) that simply creates a file on
    the server. Everything worked fine. Then I tried to test my real event
    handler. It's a small vbscript (createpost.vbs) that creates
    customised post in public folder using ADO. Script itself works fine
    when I run it on the server. I unregistered my dummy creatfile.vbs
    script and registered new createitem.vbs. it does not work.

    Is there any way to debug SMTP sink errors?

    this is my createpost.vbs file that doesnot work on SMTP sink but
    works when I run it on the server.

    Sub IEventIsCacheable_IsCacheable()
    'To implement the interface, and return S_OK implicitly
    End Sub

    Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)

    Dim iMsg
    Dim Conn
    Dim InfoNT
    Dim Info
    Dim sFolderUrl

    Set Conn = CreateObject("ADODB.Connection")
    Set iMsg = CreateObject("CDO.Message")

    sFolderUrl ="http://mercury/public/advisory"

    Conn.Provider = "EXOLEDB.datasource"
    Conn.Open sFolderUrl,"user","password"


    Dim Flds
    Set Flds = iMsg.Fields
    With Flds
    .Item("urn:schemas:httpmail:from") = "test"
    .Item("urn:schemas:httpmail:subject")="test"
    .Item("urn:schemas:httpmail:textdescription") ="body"
    .Item("dbName") = "qFullName"
    .Item("Organization") = "qCompanyName"
    .Item("http://schemas.microsoft.com/exchange/outlookmessageclass")=
    "IPM.Post.Advisory"
    .Update
    End With

    Set iDsrc = iMsg.Datasource
    iDsrc.SaveTo sFolderUrl & "/item112.eml", Conn
    iDsrc.Save

    End Sub

  2. Default Re: SMTP sink problem

    Problem solved.

    I just added <SCRIPT LANGUAGE="VBScript"> and </SCRIPT> to my event handler.
    Although script runs without <scritp> tags using cscript.exe.

+ Reply to Thread

Similar Threads

  1. Problem met with while implementing SMTP event sink with C#
    By Application Development in forum Inetserver
    Replies: 0
    Last Post: 01-05-2006, 09:07 AM
  2. SMTP Transport event sink problem
    By Application Development in forum Microsoft Exchange
    Replies: 0
    Last Post: 09-12-2005, 02:59 PM
  3. problem compiling Managed Sink Wrapper for SMTP
    By Application Development in forum Microsoft Exchange
    Replies: 0
    Last Post: 04-14-2005, 03:17 PM
  4. problem compiling Managed Sink Wrapper for SMTP
    By Application Development in forum Inetserver
    Replies: 0
    Last Post: 04-12-2005, 11:07 AM
  5. .NET SMTP ONARRIVAL SINK missing assembly problem
    By Application Development in forum Microsoft Exchange
    Replies: 1
    Last Post: 05-28-2004, 03:00 PM