Asp cdont

Hola, tengo una página en ASP mediante la cual envio un correo con el objeto CDONT, despues de instalar la actualización del exchange, me da error (exactamente permiso denegado). He visto un mensaje en el foro sobre este tema, y mire los permisos en NTFS para el usuario del IIS, le tengo dado permisos de escritura pero no funciona.
Si sirve de algo, la web la tengo en un directorio distinto al wwwroot.

1 Respuesta

Respuesta
1
A ver si te sirve este
Sub Envia_Mail(HTMLAviso, origen, destino, asunto)
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
' The full field name strings are used below to illustrate this process.
' The CDO for Windows 2000 type library contains string Modules
' that provide these values as named constants.
' Use these module constants to avoid typos and so on.
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp_server"
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpaccountname") = "Usuario Exchange"
Flds.Update
Set iMsg.Configuration = iConf
' ... compose message; add attachments, and so on.
Set Flds = iMsg.Fields
With Flds
.Item("urn:schemas:mailheader:to") = destino
.Item("urn:schemas:mailheader:from") = origen
.Item("urn:schemas:mailheader:sender") = origen
.Item("urn:schemas:mailheader:subject")= Asunto
.Update
End With
iMsg.HTMLBody = HTMLAviso
iMsg.Send ' Configuration settings in Config object are used to send the message.
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas