Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("conexion.php");
- include("class.phpmailer.php");
- $link = Conexion();
- $mail = new PHPMailer();
- $nombre = $_POST["name"];
- $correo = $_POST["email"];
- $url = $_POST["url"];
- $rutaArchivo = $_FILES['ctArchivo']['tmp_name'];
- mysql_query("INSERT INTO usuario(nombreUsuario, correoUsuario, urlUsuario) VALUES ('$nombre', '$correo', '$url')", $link) or die (mysql_error());
- $mail->Host = "mail.clinicaenadiccionesespirituamigo.com";
- $mail->Port = 26;
- $mail->Username = "joel@clinicaenadiccionesespirituamigo.com";
- $mail->Password = "a123456";
- $mail->From = "joel@clinicaenadiccionesespirituamigo.com";
- $mail->From = "Bloodrider";
- $mail->FromName = "Bloodrider";
- $mail->Subject = "Prueba de Correo";
- $mail->AddAddress($correo,$nombre);
- $body = "Prueba de correo con phpmailer";
- $mail->Body = $body;
- $mail->AltBody = "Hola";
- $mail->IsHTML(true);
- if (!empty($rutaArchivo)){
- $mail->AddAttachment($rutaArchivo, "Archivo");
- }
- if(!$mail->Send()) {
- echo "Error: ".$mail->ErrorInfo;
- }
- header("Location: ../index.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement