Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'PhpMailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- echo 'Preparando Carga <br/>';
- $mail->SMTPDebug = 1; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
- $mail->Username = 'asdasd@gmail.com'; // SMTP username
- $mail->Password = 'asdasd'; // SMTP password
- $mail->Port = 587; // TCP port to connect to
- echo 'Datos de Correo<br/>';
- $mail->From = 'asdasd@gmail.com';
- $mail->FromName = 'Mailer';
- $mail->addAddress('asdasd@live.com', 'Joe User'); // Add a recipient
- $mail->addReplyTo('asdads@gmail.com', 'Information');
- //$mail->addBCC('bcc@example.com');
- // Add attachments$mail->addAttachment('/var/tmp/file.tar.gz');
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); Optional name
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Contacto ';
- $mail->Body = 'Hola! Tienes un nuevo mensaje de <b>XXXXX!</b>: <br/><p>MENSAJE</p> <br/> Su Correo es : CORREO ';
- $mail->AltBody = '';
- echo 'Envio de Correo<br/>';
- echo (extension_loaded('openssl')?'SSL loaded':'SSL not loaded')."<br/>";
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement