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

Contacto a mi mail, ayuda!

Estas en el tema de Contacto a mi mail, ayuda! en el foro de ASP Clásico en Foros del Web. Hola amigos de foros del web, bueno mi duda es esta, he descargado una plantilla y en la cual trae un boton que es "contact" ...
  #1 (permalink)  
Antiguo 15/09/2010, 14:19
Avatar de hackerboss1  
Fecha de Ingreso: noviembre-2009
Mensajes: 21
Antigüedad: 14 años, 5 meses
Puntos: 0
Contacto a mi mail, ayuda!

Hola amigos de foros del web, bueno mi duda es esta, he descargado una plantilla
y en la cual trae un boton que es "contact"
y trae un archivo .ASP que se abre con dreamweaver, pero no se como editarlo, para que me lo manden a mi correo.
este es el codigo:



<%
'----function that removes html tags-----------
Function RemoveHTML( strText )
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, "")
End Function
'---------------------------------------------

'------defining script vars-------------------
Dim mailObj, mailCfg, myBody, fld

Dim RegEx
set RegEx = New RegExp
'--------------------------------------------

'------getting data sent by flash (filtering configuration data)------------
For Each fld in Request.Form
If Request.Form(fld) <> "" and _
fld <> "mail_to" and _
fld <> "smtp_server" and _
fld <> "smtp_port" and _
fld <> "plain_text" and _
fld <> "mail_from" and _
fld <> "mail_subject" Then
myBody = myBody & vbCRLF & " <b>" & fld & "</b> :<br/> " & Trim(Request.Form(fld)) & "<br/>"
End If
Next
'---------------------------------------------------------------------------

'----------setting conf data------------------------------------------------
On Error Resume Next
Set myMail = CreateObject("CDO.Message")
myMail.Subject = Request.Form("mail_subject")
myMail.From =Request.Form("mail_from")
myMail.To = Request.Form("mail_to")

'--------if plain text is set to true removing html---------------------------------------
if Request.Form("plain_text") = "true" then

myMail.TextBody = RemoveHTML(myBody)

'-------otherwise composing message body--------------------------------------------------
else myMail.HTMLBody = "<html><body>" & myBody & "</body></html>"

end if
'----------setting configuration params for smtp----------------------------------------------------------------------------------
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Request.Form("smtp_server")
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = Request.Form("smtp_port")
myMail.Configuration.Fields.Update
'---------------------------------------------------------------------------------------------------------------------------------
myMail.Send '---------------sending message

If Err = 0 Then
Response.Write("&mail=1") 'if there the message is sent return 1 to flash
Else
Response.Write("&mail=0") 'otherwise return 0
End If

%>


Gracias y saludos a todos.

Última edición por hackerboss1; 15/09/2010 a las 14:48
  #2 (permalink)  
Antiguo 15/09/2010, 15:47
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: Contacto a mi mail, ayuda!

Si es .asp consultaría en ese subforo, te podrán ayudar más rapidamente.
__________________
elGastronomo

Etiquetas: contacto, mail
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 20:37.