if(!isset($_POST) || count($_POST)<=0) { echo "
Not received any data.
“;
}
else
{
$id_prematricula=””;
if ($_POST[“id”] && $_POST[“id”]!=””)
$id_prematricula = $_POST[“id”];
$cadena=””;
/*INICIO CUERPO*/
$cadena .= “
$cadena .= ““;
$cadena .= “
PRE-REGISTRATION
“;
$cadena .= “
ID: “.$id_prematricula.”
“;
$cadena .= “
Completed payment.
“;
/*ENVÍO EMAIL*/
$to=”info@almamateravila.es”;
$subject=”Pre-registration payment “.$id_prematricula.” | ALMA MATER”;
$message=$cadena;
// Cabeceras adicionales
$headers = ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=UTF-8’ . “\r\n”;
$headers .= ‘From: Alma Mater
$headers .= ‘Reply-To: Alma Mater
//$headers .= ‘Cc: marina@ovnyline.com’ . “\r\n”;
$headers .= ‘Bcc: marina@ovnyline.com’ . “\r\n”;
$envio=wp_mail( $to, $subject, $message, $headers );
echo “
Payment successful.
“;
echo “
“.$_POST[“message”].”
“;
/*
if($envio)
{
echo “
Payment successful.
“;
}
else
{
echo “
Payment successful. An error occurred while sending mail confirmation.
“;
echo $cadena;
}
echo $cadena;
*/
}
[/insert_php]