2011-10-11 90 views
0

這些選項沒有工作PHP電子郵件在某些情況下,不發送

  • 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 [email protected]</p> 


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

哇......這裏沒有足夠的答案來回答你的問題。 (我不是那個標誌你順着btw的人)。 –

+2

那麼哪一個是「NoShow_Interview」或「Noshow_Interview?」 「Book_Training」或「Booked_Trained」? – Flukey

+1

沒有錯誤,當將$狀態更改爲適當的值時,所有if語句都會執行!在這裏順便說一句switch()會更好 – Anonymous

回答

4

NoShow_Interview中有一個大寫字母S,請確保您引用它爲PHP區分大小寫。

而你提到Book_Training不起作用,但是在代碼中你將它作爲Booked_Training。

相關問題