in the php program, i use it to send email.
the code is as follow:
$headers = "MIME-Version: 1.0\r\n";
$headers = $headers."Content-type: text/html; charset=big5\r\n";
$headers = $headers.'<html><head><meta http-equiv="Content-Type" content="text/html; charset=big5"></head></html>';
$e_content="<font face=\"arial\"><b>Dear $st_first $st_second ($st),
<br><br>
$s_name_first $s_name_second ($s_mine) has represented your group submitting <font color=\"#576FFF\">Neighbour, Room and Floor Preference</font> for you.
<br><br>
<i>[The password for your group representative: $pass (visible by the representative only)]</i>
<br><br>
x Hall will proceed your application according to the following information,
<br>
<font color=\"red\" size=\"6\">please check carefully:</font>
<br><br>
<table border=\"2\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"black\">
<tr>
<td>
<b>Floor Preference:
<br>
$floor_preference
<br><br>
Neighbor and Room Preference:
<br>
$student_list
</b>
</td>
</tr>
<tr>
<td bgcolor=\"#000000\" colspan=\"2\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspna=\"2\">
<font color=\"red\" size=\"6\"><b>IMPORTANT, please REPLY:</b></font>
</td>
</tr>
<tr>
<td bgcolor=\"#000000\" valign=\"top\" width=\"50%\">
<font color=\"#FFFFF\">IF you <font size=\"6\">AGREE</font> with it,</font>
<br>
<a href=\"http://xxxx/x_res/rcon.php?ran=$random&sid=$st&relt=Confirm\">
<font color=\"#576FFF\" size=\"6\">
CLICK HERE to CONFIRM
</font>
</a>
<br>
</td>
<td bgcolor=\"#000000\" valign=\"top\" width=\"50%\">
<font color=\"#FFFFF\">IF you <font size=\"6\">DISAGREE</font> with it,</font>
<br>
<a href=\"http://xxxx/x_res/rcon.php?ran=$random&sid=$st&relt=Reject\">
<font color=\"#576FFF\" size=\"6\">
CLICK HERE to REJECT
</font>
</a>
<font color=\"#FFFF00\">
<br>
(the whole group preference will NOT be proceeded,
<br>
please DISCUSS with the representative to re-submit a new form!!)
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
Let us work-in-hand to breed fruitful hall life, see you in September
<br><br>
Regards,
<br>
x Hall
<br><font color=\"red\">
<i>\"xxxx!!\"</i>
</font><br></b></font>
";
//send email
$my_email = $st."@x.edu.hk";
mail($my_email, "Your Preferences of Neighbour, Rooms, Floors 2004-05", "$e_content",
"From: x@x.edu.hk <x@x.edu.hk>\r\n" .
"Reply-To: x@x.edu.hk <x@x.edu.hk>\r\n" .
"X-Mailer: PHP/" . phpversion().$headers);
//echo "$e_content";
when i echo the $e_content, there is no problem in the link.
however, in a email
one of the hyperlink is:
http://xxxx/x_res/rcon.php?ra=111&a...amp;relt=Reject
// a 'n' is missed
in another email
http://xxxx/x_res/rcon.php?ran=111&...amp;relt=Reject
// a 'i' is missed
the correct link should be:
http://xxxx/x_res/rcon.php?ran=111&...amp;relt=Reject
THE PROBLEM is,
1. the email is used the for loop to generate, therefore, it there is error, the error should be consistent
2.why there is no problem when ECHO..but there is problem in the email ?