Note that there are some explanatory texts on larger screens.

plurals
  1. POCakephp mail is not sending to mail id
    text
    copied!<p>In my code mail is not sending to mail id but the data is inserting into table here am attaching my controller code </p> <pre><code>function supportrequest() { $heading = 'DATA CENTER SUPPORT'; $this-&gt;set('heading', $heading); if(!empty($this-&gt;data)) { $this-&gt;data['SupportRequest']['date'] = date('Y-m-d H:i:s'); $this-&gt;data['SupportRequest']['supportId'] = 'SRID-'.$this-&gt;uuid(); $SRID = $this-&gt;data['SupportRequest']['supportId']; $this-&gt;data['SupportRequest']['name'] = strtolower($this-&gt;data['SupportRequest']['name']); $this-&gt;data['SupportRequest']['status'] = 'Open'; //print_r($this-&gt;data); /*$adminurl = "https://www.antzmedia.com/admin/supportrequestlogin/sid:".$this-&gt;data['SupportRequest']['supportId']; $message = "You have a new support request from a customer. Please follow the below link to see the support request.&lt;br/&gt;&lt;br/&gt;"; $message .= $adminurl; //$to = "marvil@antzmedia.org"; $to = "support@antzmedia.org"; $subject = "Support Request Entry"; // To send HTML mail, the Content-type header must be set $headers = "MIME-Version: 1.0\r\n" ."Content-Type: text/html; charset=iso-8859-1\r\n" ."Content-Transfer-Encoding: 8bit\r\n" ."From: =?UTF-8?B?". base64_encode($this-&gt;data['SupportRequest']['name']) ."?= &lt;".$this-&gt;data['SupportRequest']['email']."&gt;\r\n" ."X-Mailer: PHP/". phpversion(); mail($to, $subject, $message, $headers);*/ $userurl = Router::url('/', true)."home/supportrequeststatus/sid:".$SRID; $to2 = $this-&gt;data['SupportRequest']['email']; $subject2 = "Support Request Info"; /*$message2 = "You have received this mail because you have made a support request to Antz Media.&lt;br/&gt; Your concern has been registered and our support team will be in touch with you soon.&lt;br/&gt; This is your Support Request ID : &lt;b style=color:green&gt;".$this-&gt;data['SupportRequest']['supportId']."&lt;/b&gt;&lt;br/&gt; Use this ID to track the progress of your queries.&lt;br/&gt; Please follow this url to get your support request status : ".$userurl."&lt;br/&gt;&lt;br/&gt; Thankyou.";*/ $message2 = '&lt;table cellspacing="0" cellpadding="8" border="0" width="600" style=" background:#B9FFEF; border-radius: 5px 5px 5px 5px; "&gt; &lt;tr&gt; &lt;td colspan="2"&gt;&lt;strong&gt;Greetings From CTL !!!&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;td style="font-family:Verdana, Arial; font-size:14px; color:#333333;"&gt;Your query has been successfully submitted.&lt;/td&gt; &lt;tr &gt; &lt;td style="font-family:Verdana, Arial; font-size:14px; color:#333333;"&gt;Your Support Request ID :&lt;font color="green"&gt;&lt;b&gt;'.$this-&gt;data['SupportRequest']['supportId'].'&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr &gt; &lt;td style="font-family:Verdana, Arial; font-size:14px; color:#333333;"&gt;Use this ID to track the progress of your query. Our Technical Support Team will surely assist you to resolve your concern.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;/tr&gt; &lt;tr &gt; &lt;td style="font-family:Verdana, Arial; font-size:13px; color:#333333;"&gt;Click &lt;font color="blue"&gt;'.$userurl.' &lt;/font&gt;to check your status.&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;'; $headers2 = "MIME-Version: 1.0\r\n" ."Content-Type: text/html; charset=iso-8859-1\r\n" ."Content-Transfer-Encoding: 8bit\r\n" ."From: =?UTF-8?B?". base64_encode("CTL") ."?= &lt;admin@noreply.com&gt;\r\n" ."X-Mailer: PHP/". phpversion(); mail($to2, $subject2, $message2, $headers2); if ($this-&gt;SupportRequest-&gt;save($this-&gt;data)) { $this-&gt;Session-&gt;setFlash('&lt;br/&gt;Support Request has been submitted successfully.&lt;br/&gt;&lt;br/&gt; Your Unique Support Request ID ( &lt;b&gt;'.$SRID.'&lt;/b&gt; ) has been sent to your E-mail.&lt;br/&gt;&lt;br/&gt; For further updates,please check your E-mail Inbox / Junk Folder or our website regularly.&lt;br/&gt;&lt;br/&gt;','default',array('class' =&gt;'successbox')); $this-&gt;redirect('/home/supportrequest'); } else { $this-&gt;Session-&gt;setFlash('Something went wrong please try again after refreshing the page.','default',array('class' =&gt;'errorbox')); } } } </code></pre> <p>I have tried many email id's but the same is happening...that means no mail is send to mail id provided....</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload