コード例 #1
0
ファイル: f_pregunta.php プロジェクト: darwinv/vogues
function sendPregunta()
{
    $destino = new usuario($_POST["usr_id"]);
    $correo = new email();
    $link_detalle = FULL_WEBPAGE . '/detalle.php?id=' . $_POST["pub_id"];
    $link_pregunta = FULL_WEBPAGE . '/preguntas.php?tipo=1&publicacion=' . $_POST["pub_id"];
    $links = array("detalle" => $link_detalle, "pregunta" => $link_pregunta);
    $correo->sendPregunta($destino->a_email, $links, $_POST['pregunta']);
    /*
    $cli = new usuario($_POST["usr_id"]);
    $poster = new usuario($_POST["id_poster"]);
    $publicacion = new publicaciones($_POST["pub_id"]);
    ini_set("sendmail_from",$poster->a_email);
    $email_to = "" . $cli-> a_email . "";
    
    $email_subject = "Apreciodepana.com "." -  ".$poster-> n_nombre." ".$poster->n_apellido." tiene una pregunta!";
    $email_message = "Sobre la publicacion:  ".$publicacion -> titulo." \n\n ".$_POST['pregunta'];	
    
    $headers = 'From: Apreciodepana.com ' . "\r\n" . 'Reply-To: '  . "*****@*****.**" . "\r\n" . 'X-Mailer: PHP/' . phpversion ();
    mail ( $email_to, $email_subject, $email_message, $headers );
    echo json_encode(array("correo a enviar"=>$cli-> a_email, "correo from"=>$poster->a_email,"header"=>$headers,"subject"=>$email_subject,"message"=>$email_message));			
    */
    //echo json_encode(array("estado"=>"OK"));
}