Bonjour.
voici mon script : il serts a envoyer un courriel a un ami avec les informations sur un emplois.
Le script va tres bien, mais...Mon problème c'est qu'il envoie seulement un courriel en texte, pas moyen de joindre des images qui me permettrais de personnalisé le courriel graphiquement.
Je suis un peu débutant, même si a force de vous lire on se perfectionne pas mal, je vous join le code de ma page PHP en espérant que quelqu'un peuve me dire comment transformer mon code pour reussir a envoyer mon texte agrémenté d'images .
Patrick alias zakomtl
//---------------------------
//Voici mon code
//-----------------------------
<?
require_once "../connect.php";
include_once "../main.php";
include_once "../configuration.inc.php";
if(isset($ok) && $ok == 'Send my application')
{
$q1 = "select CompanyEmailRH from job_employer_info where ename = \"$_POST[ename]\"";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
$url = "
http://$myurl/employers/email-postulant.php?uname=$uname";
$q2 = "select * from job_resume where uname = \"$uname\" ";
$r2 = mysql_query($q2) or die(mysql_error());
$a2 = mysql_fetch_array($r2);
if(empty($a2[resume_title]))
{
echo "<br><br><br><center> You have not a resume yet. <br> Please, <a class=TN href=post-resume.php> build</a> one and then apply for the job.</center>";
exit;
}
$qui = "insert into job_aplicants set job_id = \"$_POST[job_id]\", aplicant = \"$uname\"";
$rui = mysql_query($qui) or die(mysql_error());
$from = "From: $a2[0] <$a2[1]>";
$subject = "New job applicant";
$message = "A job seeker has applyed for your job offer. <br> To review the applicant`s resume, visit this address:\n $url\n\n You can access this information from Employers menu/Manage Jobs and then click on the link \"view applicants list\" for each job offer.";
$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
mail($a1[0], $subject, $message, $from);
echo "<br><br><br><center> Your aplication was sent to the employer.</center>";
}
elseif(isset($friend) && $friend == 'Send to a friend')
{
$url = "
http://$myurl/jobseekers/jobseekers1.php?job_id=$_POST[job_id]";
?>
<table width='100%' border='0' cellspacing='1' cellpadding='5'>
<tr>
<td height='16' bgcolor='#FFCC00'><center>
<b><font color='#000000'>Send this Job to your friend.</font></b>
</center></td>
</tr>
</table><br><br>
<form action=send2.php method=post>
<table align=center>
<tr>
<td><b> Friend's email: </b></td>
<td><input type=text name=femail size=31></td>
</tr>
<tr>
<td valign=top><b>Message: </b></td>
<td><textarea rows=4 cols=26 name=fmessage>I found a great Job Offer at <?=$mydomain?>. Go to this URL to find out more. <?=$url?> </textarea></td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=submit name=submit value=Send>
</td>
</tr>
</table>
</form>
<?
}
?>
<? include_once('../footer.php'); ?>