Que tal este formulario sirve bien para enviar notificaciones al correo del cliente de que su pedido ha sido registrado. obviamente con el formulario previamente creado y algunas otras cosas.
El punto es que quiero enviar también una copia a mi propio correo, que código tendría que agregar?
Gracias de antemano
--------------------------------------------------------------
<?php
$email=$_GET['email'];
$nombre=utf8_decode($_GET['nombre']);
$asunto=$_GET['asunto'];
$cuerpo=utf8_decode($_GET['cuerpo']);
require("../phpmailer/class.phpmailer.php");
require("../phpmailer/class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "[email protected]"; // SMTP password
$mail->Port = 465;
$mail->SMTPDebug = 1;
$webmaster_email = "[email protected]"; //Reply to this email ID
$mail->From = $webmaster_email;
$mail->FromName = "Mi negocio";
$mail->AddReplyTo($webmaster_email,"Mi negocio");
$mail->IsHTML(true); // send as HTML
$mail->WordWrap = 50;
//$mail->AddAttachment("../../imagenes/logplano.PNG", "logo.png");
$firma='
<b><font style="" color="#1f497d"><font style="font-size: 12pt;" size="3"></font></font></b><br>
<br>
<img src="http://gfx2.hotmail.com/mail/w4/pr01/ltr/emoticons/phone.gif" alt="" width="19" height="19"> <font style="" color="#1f497d"><b>5670-9804</b></font> <img src="http://gfx2.hotmail.com/mail/w4/pr01/ltr/emoticons/mobile.gif" alt="" width="19" height="19"> <font style="" color="#1f497d"><b>62*145278*3</b></font><br>
<br>';
$iniciocuerpo = '
<html>
<head>
<title>Correo recepción</title>
<style>
body{
}
</style>
</head>
<body>
<p>
<font color="#003399" font-family="Tahoma" font-size="12px">
';
$fincuerpo=$firma.'</body></html>';
$mail->Subject = $asunto;
$contenido = $iniciocuerpo.$cuerpo.$fincuerpo;
$mail->Body = $contenido;
if(!$mail->Send())
{
echo "ERROR AL ENVIAR EL CORREO: " . $mail->ErrorInfo;
}
else
{
echo "CORREO ENVIADO";
}
?>