Let's see I have the script in php, it works very well for me to send emails, but I would like to compress everything and encrypt them I have seen a library for this as (phpzip and ziparchive) or (php-encryption); And I do not get to include them there Please, if anybody knows about the subject, I am grateful
<?php
$Nombre = $_POST['Nombre'];
$Email = $_POST['Email'];
$Mensaje = $_POST['Mensaje'];
$Telefono = $_POST['Telefono'];
$archivo = $_FILES['adjunto'];
$archivo2 = $_FILES['adjunto2'];
$archivo3 = $_FILES['adjunto3'];
if ($Nombre=='' || $Email=='' || $Mensaje=='' || $Telefono==''){
echo "<script>alert('Los campos marcados con * son obligatorios');location.href ='javascript:history.back()';</script>";
}else{
require("archivosformulario/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = $Email;
$mail->FromName = $Nombre;
$mail->AddAddress("[email protected]"); // Dirección a la que llegaran los mensajes.
// Aquí van los datos que apareceran en el correo que reciba
//adjuntamos un archivo
$mail->WordWrap = 50;
$mail->IsHTML(true);
$mail->Subject = "Contacto";
$mail->Body = "Nombre: $Nombre \n<br />".
"Email: $Email \n<br />".
"Mensaje: $Mensaje \n<br />".
"Telefono: $Telefono \n<br />";
$mail->AddAttachment($archivo['tmp_name'], $archivo['name']);
$mail->AddAttachment($archivo2['tmp_name'], $archivo2['name']);
$mail->AddAttachment($archivo3['tmp_name'], $archivo3['name']);
// Datos del servidor SMTP
$mail->IsSMTP();
$mail->Host = "ssl://smtp.gmail.com:465"; // Servidor de Salida.
$mail->SMTPAuth = true;
$mail->Username = "[email protected]"; // Correo Electrónico
$mail->Password = "pass"; // Contraseña
if ($mail->Send())
echo "<script>alert('Formulario enviado exitosamente, le responderemos lo más pronto posible.');location.href ='javascript:history.back()';</script>";
else
echo "<script>alert('Error al enviar el formulario');location.href ='javascript:history.back()';</script>";
}
?>