Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'PHPMailerAutoload.php';
- require 'class.smtp.php';
- require 'class.phpmailer.php';
- $mail = new PHPMailer;
- //Vars
- $name=$_POST['name'];
- $email=$_POST['email'];
- $msg=$_POST['message'];
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.correoseguro.co;smtp.likemedia.com.ar'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'salvador@likemedia.com.ar'; // SMTP username
- $mail->Password = 'Salvatore95'; // SMTP password
- $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 465; // TCP port to connect to
- $mail->setFrom('salvador@likemedia.com.ar', 'PERALTA RAMOS');
- $mail->addAddress('salvador@likemedia.com.ar'); // Name is optional
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = $msubject;
- $mail->Body = "Nombre: " . $name . "rn" . "Mail: " . $email . "rn" . "Mensaje: " . $msg;
- if(!$mail->send()) {
- echo 'No se pudo enviar el mail';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'El mail ha sido enviado exitosamente!';
- }
- //$exito = $mail->Send(); // Envía el correo.
- //if($exito){
- //echo "El correo fue enviado correctamente.";
- //}else{
- //echo "Hubo un inconveniente. Contacta a un administrador.";
- //}
- //?>
- <!-- Contact -->
- <article id="contact">
- <h2 class="major">Contacto</h2>
- <form method="post" action="PHPMailer/contacto.php">
- <div class="field half first">
- <label for="name">NOMBRE</label>
- <input type="text" name="name" id="name" />
- </div>
- <div class="field half">
- <label for="email">MAIL</label>
- <input type="text" name="email" id="email" />
- </div>
- <div class="field">
- <label for="message">MENSAJE</label>
- <textarea name="message" id="message" rows="4"></textarea>
- </div>
- <ul class="actions">
- <li><input type="submit" value="ENVIAR" class="special" /></li>
- <li><input type="reset" value="LIMPIAR" /></li>
- </ul>
- </form>
- <ul class="icons">
- <li><a href="https://www.facebook.com/salva.castro95" class="icon fa-facebook"><span class="label">Facebook</span></a></li>
- <li><a href="https://www.twitter.com/salva_castro95" class="icon fa-twitter"><span class="label">Twitter</span></a></li>
- <li><a href="https://www.instragram.com/salva_castro95" class="icon fa-instagram"><span class="label">Instagram</span></a></li>
- </ul>
- </article>
Add Comment
Please, Sign In to add comment