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

Enviar e-mail por ASP

Estas en el tema de Enviar e-mail por ASP en el foro de ASP Clásico en Foros del Web. Tengo uina rutina que utiliza el Activex CDONTS, para enviar e-mail por SMPT...per no enviía nada, al rato me tira un TimeOut, el problema que ...
  #1 (permalink)  
Antiguo 24/01/2005, 12:10
 
Fecha de Ingreso: enero-2005
Ubicación: Bs. as.
Mensajes: 5
Antigüedad: 19 años, 5 meses
Puntos: 0
Enviar e-mail por ASP

Tengo uina rutina que utiliza el Activex CDONTS, para enviar e-mail por SMPT...per no enviía nada, al rato me tira un TimeOut, el problema que tengo seguramente es la configuración del SMPT, alguien´podrá instruirme de como configurar el SMPT ?. Muchas gracias
  #2 (permalink)  
Antiguo 24/01/2005, 14:27
 
Fecha de Ingreso: enero-2005
Mensajes: 16
Antigüedad: 19 años, 4 meses
Puntos: 0
Un ejemplo del programa ScriptMaster

Un ejemplo de uso de CDONTS que incluye validación de campos. A ver si te sirve.



<%

' Author: Joaquim Ferreira
' Example of how to call the function:
' Call EmailCdonts("[email protected]",Recipient, "", "Subject",strBody ,0,"",2)

Function EmailCdonts(byval strAuthorEmail,byval strRecipientEmail,ByVal strCC, byval strSubject,byval strBody,
ByVal intMailFormat,ByVal strAttachmentPath,ByVal intPriority)
Dim ObjMail

'-----------------------[ START ERROR CHECKING ]---------------------------
If strAuthorEmail = "" or isnull(strAuthorEmail) Then
Response.Write("The author email parameter is missing")
Response.End
End If

If strRecipientEmail = "" or isnull(strRecipientEmail) Then
Response.Write("The Recipients email parameter is missing")
Response.End
End If

If strSubject = "" or isnull(strSubject) Then
Response.Write("The Subject parameter is missing")
Response.End
End If

If intMailFormat = "" or isnull(intMailFormat) Then
Response.Write("The Email Type parameter is missing, [ 0 = HTML / 1 - Text ] - Required Paramter")
Response.End
End If

'-----------------------[ END ERROR CHECKING ]---------------------------

Set ObjMail = Server.CreateObject("CDONTS.NewMail")

ObjMail.FROM = strAuthorEmail
ObjMail.TO = strRecipientEmail

If strCC <> "" Then
ObjMail.Cc = strCC
End If


ObjMail.Subject = strSubject

ObjMail.BodyFormat = intMailFormat
ObjMail.MailFormat = intMailFormat
ObjMail.Body = strBody

' CdoHigh = 2 - Highest priority (Urgent)
' CdoNormal = 1 - Normal
' CdoLow = 0 - Lowest
ObjMail.Importance = intPriority


If strAttachmentPath <> "" Then
ObjMail.AttachFile strAttachmentPath
End If

ObjMail.Send

Set ObjMail= Nothing

End Function
%>
  #3 (permalink)  
Antiguo 25/01/2005, 00:39
 
Fecha de Ingreso: diciembre-2004
Ubicación: Morelia,Michoacan,México
Mensajes: 22
Antigüedad: 19 años, 5 meses
Puntos: 0
CDONTS vs CDOSYS

Saludos...:

De antemano un saludo a todos, el problema es con el server que no soporta CDONTS y hay que cambiar el codigo con CDOSYS , podrian ayudar a describir la diferencia en codigo !???? el nuevo es el siguiente :

Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")

Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
Flds.Update

Set iMsg.Configuration = iConf
iMsg.To = "[email protected]"
iMsg.From = "[email protected]"
iMsg.Subject = "Message with CDOSYS"
iMsg.TextBody = "Message body CDOSYS"
iMsg.Send
  #4 (permalink)  
Antiguo 25/01/2005, 04:33
 
Fecha de Ingreso: enero-2005
Ubicación: Bs. as.
Mensajes: 5
Antigüedad: 19 años, 5 meses
Puntos: 0
Envío de E-mail por ASP

Muchas gracias, viendo tu correo, me doy cuenta que obvié un dato importante: 1) Mi SO es WXP, y 2) No cuento con un programa lector de e-mail como: Microsoft Exchange o Outlook...
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 22:27.