Foros del Web » Programando para Internet » Javascript »

Necesito modificar funcion

Estas en el tema de Necesito modificar funcion en el foro de Javascript en Foros del Web. Hola por favor alguien que me pueda dar una mano??? Por favor ver la rutina.. al final esta la consulta A continuacion la funcion original. ...
  #1 (permalink)  
Antiguo 07/12/2013, 14:19
 
Fecha de Ingreso: enero-2010
Mensajes: 52
Antigüedad: 14 años, 3 meses
Puntos: 0
Necesito modificar funcion

Hola por favor alguien que me pueda dar una mano???

Por favor ver la rutina.. al final esta la consulta

A continuacion la funcion original.

Language=VBScript
Param=[%1]|Text|From:
Param=[%2]|Text|To:
Param=[%3]|Text|SMTP Server:
Param=[%4]|Text|User Name:
Param=[%5]|Text|Password:
Param=[%6]|Text|Message:
Param=[%7]|Text|Subject
Param=[%8]|Text|Use SSL ? ( YES / NO )
Param=[%9]|Text|Attachment
{End}
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "[%7]"
objMessage.From = "[%1]"
objMessage.To = "[%2]"
'objMessage.TextBody = "[%6]"
objMessage.HTMLBody = "[%6]"

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "[%3]"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[%4]"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "[%5]"


'Use SSL for the connection (False or True)

if "[%8]" = "NO" Then
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
else
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

'Server port 465
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
end if

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

If "[%9]" <> "" Then
objMessage.AddAttachment ("[%9]")
End If


objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

On Error Resume Next


objMessage.Send

If Err.Number = 0 Then
msgbox "mail enviado satisfactoriamente ! ", vbInformation, " e-mail"
'Enviar_Mail_CDO = True
Else
MsgBox Err.Description, vbCritical, " Error al enviar el mail "
End If


Set objMessage = Nothing

Bien la modificacion que yo necesito es justo al final de la accion una vez que el correo ha sido enviado lo que hace actualmente es mostrar un cuadro de dialogo donde dice que fue enviado con exito o en su defecto que hubo un error...

Lo que yo necesito es que no muestre ningun cartel, que el error lo guarde en una variable en el clipboard de windows donde yo la pueda tomar y a su vezque si el correo salio satisfactoriamente me guarde la direccion de correo enviada en un archivo llamado exito.dat y si hubo error al enviar me la guarde en un archivo que se lleme error.dat

Etiquetas: funcion, html, modificar, variable
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 19:21.