This my code in cakephp method in one of my controller , but no email is coming to account. I really need help on this.
When I printing $cc
variable , its giving an output of array , but dont know how to know whether mail has been send successfully or not .
Since no mail came to the mailaccount , so i guess mail is not sende properly , or there is some bug in my code .
$email = new CakeEmail('default');
$body = "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
</head>
<body>
<div style='background: #F6F6F6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin: 0; padding: 0;'>
<table cellspacing='0' cellpadding='0' border='0' height='100%' width='100%'>
<tr>
<td align='center' valign='top' style='padding: 20px 0 20px 0'>
<table bgcolor='FFFFFF' cellspacing='0' cellpadding='10' border='0' width='624' style='border:1px solid #E0E0E0;'>
<tr>
<td width='147' align='center'><img src='".Router::url('/', true)."images/logo.png'></td>
</tr>
<tr bgcolor='#666666'>
<td colspan='2' align='center'>
Forgot Password
</td>
</tr>
<tr bgcolor='#CCCCCC'>
<td colspan='2'>Hello Admin, </td>
</tr>
<tr bgcolor='#E7E6EC'>
<td> </td>
<td width='415'>Your new password : ".$new_password."</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>";
$email->from(array($adminemail =>"Cakeshop"));
$email->emailFormat('both');
//$email->to($check['AdminLogin']['admin_email_address']);
$email->to(array($adminemail));
$email->subject('Recover Password');
$cc=$email->send($body);