
| |||
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 ![]() |
| |||
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 %> |
| |||
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 |
| |||
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... ![]() |