Foros del Web » Programando para Internet » ASP Clásico »

Ayuda con Exchange Server y ASP

Estas en el tema de Ayuda con Exchange Server y ASP en el foro de ASP Clásico en Foros del Web. Hola que tal estoy desarrollando un event sink en el exchenge server para que me notifique cada cuando se manda un correo a x dominio, ...
  #1 (permalink)  
Antiguo 21/11/2003, 15:15
Usuario no validado
 
Fecha de Ingreso: abril-2002
Ubicación: Mexico DF
Mensajes: 41
Antigüedad: 23 años, 1 mes
Puntos: 0
Ayuda con Exchange Server y ASP

Hola que tal estoy desarrollando un event sink en el exchenge server para que me notifique cada cuando se manda un correo a x dominio, el problema que tengo es q no puedo guardar el evento a una base de datos, si no que lo estoy creando en un txt, y no es tan funcional como si se fuera directo a la base, alguien ha realizado algo similar ?

adjunto mi codigo saludos.


<SCRIPT LANGUAGE="VBScript">
On Error Resume Next
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
TextDisclaimer = Msg.To
HTMLDisclaimer = Msg.To
If Msg.HTMLBody <> "" Then
'Search for the "</body>" tag and insert our discliamer before that tag.
pos = InStr(1, Msg.HTMLBody, "</body>", vbTextCompare)
szPartI = Left(Msg.HTMLBody, pos - 1)
szPartII = Right(Msg.HTMLBody, Len(Msg.HTMLBody) - (pos - 1))
Msg.HTMLBody = szPartI + HTMLDisclaimer + szPartII
Msg.TextBody = Msg.TextBody & vbCrLf & TextDisclaimer & vbCrLf
cont = ""
Else
Msg.TextBody = Msg.TextBody & vbCrLf & TextDisclaimer & vbCrLf
cont = left (Msg.TextBody,30)
End If

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''
Const ForReading = 1, ForAppending = 8
Dim fso, f, m
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("I:\Archivo.txt", ForAppending, True)
f.Close
Set f = fso.OpenTextFile("I:\Archivo.txt", ForReading)
m = f.ReadAll
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("I:\Archivo.txt", True)
tf.WriteLine( m & msg.To & msg.Bcc & msg.CC & "~"& msg.Subject &"\"& cont & chr(124)& Chr(10) )
tf.Close
set tf = nothing
set fso = Nothing

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''
Msg.DataSource.Save ' Commit the changes into the transport Stream
pEventStatus = cdoRunNextSink
End Sub
</SCRIPT>


'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''

En lugar de que se guarde en el txt quiero mandarlo a una base de datos espero q me puedan ayudar
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:55.