在某些情况下PHP电子邮件不发送

时间:2011-10-11 00:23:51

标签: php email if-statement

这些选项无效

  • Noshow_interview
  • Book_Training

所有其他选项都运作良好

只是想知道是否有人看到错误。

  if($status == 'Uncontactable'){
            $html= "Dear $d[1] $d[2],<br><br>
<p>Thank you for your recent job application We have tried contacting you to arrange an appointment but have been unsuccessful. Please call us on</p>
<br>

Kind regards,<br><br> <br>";}
        //else if($status == 'NoShow_Training')
        if($status == 'NoShow_Training'){
            $html= "Dear $d[1] $d[2],<br><br>
<p>Our records indicate that you were booked in for training on $d[13] at $d[16] and did not turn up for training.<br>
Please contact me onu. </p>
<br>

Regards,<br><br><br>";}
        //else if($status == "NoShow_Interview")
        if($status == 'NoShow_Interview'){
        //if($status === "Test"){
            echo "--------";
            echo $status;
            echo "--------";
            $html= "Dear $d[1] $d[2],<br><br>
<p>Thank you for your recent job application at
<br>
Our records indicate that you were booked in for an interview with us on $d[10] at $d[11]. However you did not turn up for the interview. If you are still looking for work and would like to arrange an alternate appointment please contact met </p>
<br>

Regards,<br><br><br>";}

//      else if($status == 'Booked_Interview')
        if($status == 'Booked_Interview'){
            $html= "Hi $d[1] $d[2],<br><br>
<p>We're looking forward to meeting with you on $d[10] at $d[11].</p>

<p>We will attend to you.</p>
<br>

Kind regards,<br><br><br>";}
//      else if($status == 'Booked_Training')
        if($status == 'Booked_Training'){
            $html= "Hi $d[1] $d[2],<br><br>
<p><b>Congratulations</b> on your successful interview with.</p>

<p>We are excited to have you as part of our team.</p>

<p>Training is scheduled for the $d[13] at $d[16], we look forward to seeing you then.</p>

<p>If you have any further queries, please do not hesitate to contact me on (03) 4514 or email on at admin@email.com.au.</p>


<br>
Kind regards,<br><br><br>";}

1 个答案:

答案 0 :(得分:4)

NoShow_Interview中有一个大写字母S,请确保您引用它,因为PHP区分大小写。

你提到Book_Training不起作用,但在代码中你将它作为Booked_Training。