20/05/2013, 17:43
|
| | Fecha de Ingreso: mayo-2013
Mensajes: 3
Antigüedad: 10 años, 11 meses Puntos: 0 | |
Respuesta: Alguien que me ayude Cita:
Iniciado por bulter Me perdi ... buscaste en google por horas que _ Enviar un Mail :O
[url]http://php.net/manual/es/function.mail.php[/url] ? Código PHP: <?php /*** * @author bulter */ function sendMail(array $data) { if(!isset($data["from"], $data["subject"], $data["to"], $data["message"])) { throw new InvalidArgumentException("Some data in the parameter is missing."); } $headers = array(); $headers[] = "MIME-Version: 1.0"; $headers[] = "Content-type: text/plain; charset=utf-8"; $headers[] = "From: " . $data["from"]; $headers[] = "X-Mailer: PHP/" . phpversion(); $sendMailResult = @mail($data["to"], $data["subject"], $data["message"], implode("\r\n", $headers)); if($sendMailResult) { return true; } else { return false; } } $emailData = array(); $emailData["from"] = "[email protected]"; $emailData["to"] = "[email protected]"; $emailData["subject"] = "aaaa I think the index says all"; $emailData["message"] = "HERE GOS YOUR MESSAGE WITH THE DATA"; if(sendMail($emailData)) { echo "Sended"; } else { echo "FAIL!"; } ?> Bueno no esperes que te haga el contenido del mensaje tambien. No entendistes , el codigo para mandar un mail se consigue pero , lo que quiero es : Si esta tildado el check box diga asi
Producto xxx cantidad xx |