%
Function IsValidEmail(strEmail)
Dim bIsValid
bIsValid = True
If Len(strEmail) < 5 Then
bIsValid = False
Else
If Instr(1, strEmail, " ") <> 0 Then
bIsValid = False
Else
If InStr(1, strEmail, "@", 1) < 2 Then
bIsValid = False
Else
If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then
bIsValid = False
End If
End If
End If
End If
IsValidEmail = bIsValid
End Function
%>
<%
If Request.Form <> "" Then
Nombre = Trim(Request.Form("TxtNombre"))
Apellido = Trim(Request.Form("Txtapellido"))
Ciudad = Trim(Request.Form("Txtciudad"))
Telefono = Trim(Request.Form("TxtTelefono"))
Direccion = Trim(Request.Form("TxtDireccion"))
email = Trim(Request.Form("Txtemail"))
denuncia = Trim(Request.Form("Txtdenuncia"))
If Nombre = "" or apellido = "" or ciudad = "" or direccion = "" or telefono = "" or email = "" or Not IsValidEmail(email) or denuncia = "" Then
ErrorMsg = ErrorMsg & "Por favor ingrese los datos correctamente. "
End If
If ErrorMsg = "" Then
'---------------------------------------------------------
' envio email para el concurso
'---------------------------------------------------------
Destinatario = "Denuncia a Canal 1"
EmailDestinatario = "smacias@canal1tv.com"
Remitente = Nombre & " " & apellido
EmailRemitente = email
DestinatarioCopia = "Denuncia a Canal 1"
EmailDestinatarioCopia = "gcamacho@punto.net.ec"
Asunto = "Denuncia a Canal 1"
Mensaje = "Nombre Completo: " & Nombre & " " & Apellido & chr(10)
Mensaje = Mensaje & "Dirección: " & Direccion & chr(10)
Mensaje = Mensaje & "Teléfono: " & Telefono & chr(10)
Mensaje = Mensaje & "Ciudad: " & Ciudad & chr(10)
Mensaje = Mensaje & "email: " & email & chr(10)
Mensaje = Mensaje & "Denuncia: " & denuncia & chr(10)
Retorno = EnviarCorreo(Remitente, EmailRemitente, Destinatario, EmailDestinatario, DestinatarioCopia, EmailDestinatarioCopia, Asunto, Mensaje)
End If
End If
%>