First off all Thanks for your reply.
It's not working with me.
Wathever i do, the mail goes just to the first person in the recordset.
don't understand.
I thing wy code is right but...
<?php
//Connection statement
require_once('../Connections/goecon.php');
//Aditional Functions
require_once('../includes/functions.inc.php');
// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');
// Load the common classes
require_once('../includes/common/KT_common.php');
// begin Recordset
$colname__det_poste = '1028';
if (isset($_GET['idposte'])) {
$colname__det_poste = $_GET['idposte'];
}
$query_det_poste = sprintf("SELECT tbl_postes.dt_propo, tbl_postes.id_poste, tbl_postes.id_entreprise, tbl_postes.id_cons, tbl_postes.intitule, tbl_modecont.int_relation, tbl_postes.nbpostes, tbl_type_contrats.int_contrat, tbl_cntrec.int_cntrec, tbl_occupation.int_occup, tbl_postes.nbheures, tbl_postes.duree, tbl_postes.taches, tbl_postes.profil, tbl_postes.datedebut, tbl_postes.lieuposte, tbl_postes.observations, tbl_postes.pourvu, tbl_postes.validation, CONCAT(tbl_users.usr_prenom,\" \",tbl_users.uer_nom) AS cons, If(DateDiff(Now(),tbl_postes.dt_propo)<10,\"new\",Null) AS new, tbl_rom5.lib_rom5, tbl_rom5.id_rome5, tbl_entreprises.nom_ent FROM tbl_entreprises INNER JOIN ((((((tbl_type_contrats INNER JOIN tbl_postes ON tbl_type_contrats.id_c INNER JOIN tbl_occupation ON tbl_postes.occupation = tbl_occupation.id_occup) INNER JOIN tbl_cntrec ON tbl_type_contrats.id_cntrec = tbl_cntrec.id_cntrec) INNER JOIN tbl_users ON tbl_postes.id_c LEFT JOIN tbl_rom5 ON tbl_postes.cdrome = tbl_rom5.id_rome5) INNER JOIN tbl_modecont ON tbl_postes.modec ON tbl_entreprises.id_entr = tbl_postes.id_entreprise WHERE (((tbl_postes.id_poste)=%s)) ORDER BY tbl_postes.dt_propo DESC , tbl_postes.id_poste DESC", GetSQLValueString($colname__det_poste, "int"));
$det_poste = $goecon->SelectLimit($query_det_poste) or die($goecon->ErrorMsg());
$totalRows_det_poste = $det_poste->RecordCount();
// end Recordset
// begin Recordset
$colname__user = '-1';
if (isset($_POST['groupe'])) {
$colname__user = $_POST['groupe'];
}
$query_user = sprintf("SELECT idconseiller, uer_nom, usr_prenom, usr_mail FROM tbl_users WHERE usr_typposte = %s", GetSQLValueString($colname__user, "int"));
$user = $goecon->SelectLimit($query_user) or die($goecon->ErrorMsg());
$totalRows_user = $user->RecordCount();
// end Recordset
// begin Recordset
$KTColParam1__interlo = '1222';
if (isset($_GET["idposte"])) {
$KTColParam1__interlo = $_GET["idposte"];
}
$query_interlo = sprintf("SELECT tbl_contposte.Idcontpost, tbl_contposte.idposte, tbl_contposte.identr, tbl_contacts.id_contact, tbl_contacts.id_entrep, tbl_contacts.dt_creation, tbl_genre.abrevgenre, tbl_contacts.prenomcont, tbl_contacts.nomcont, tbl_contacts.fonction, tbl_contacts.tel, tbl_contacts.fax, tbl_contacts.mail, tbl_contacts.poste FROM ((tbl_contposte INNER JOIN tbl_contacts ON tbl_contacts.id_c INNER JOIN tbl_genre ON tbl_genre.id_genre=tbl_contacts.genre) WHERE tbl_contposte.idposte=%s ORDER BY tbl_contacts.dt_creation DESC", GetSQLValueString($KTColParam1__interlo, "int"));
$interlo = $goecon->SelectLimit($query_interlo) or die($goecon->ErrorMsg());
$totalRows_interlo = $interlo->RecordCount();
// end Recordset
ob_start();
//PHP ADODB document - made with PHAkt 3.7.1
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php //PHP ADODB document - made with PHAkt 3.7.1?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<