/home/desid573/public_html/eway/pdd/app/Controller/Component
Edit: /home/desid573/public_html/eway/pdd/app/Controller/Component/MailerComponent.php (2790B)
config($emailCofig);
$email->emailFormat($formate);
$email->from(array('bigwyffy@gmail.com' => 'Admin Demo'));
$email->to($to);
$email->cc($cc);
$email->bcc($bcc);
$email->replyTo($replyto);
$email->subject($subject);
$email->theme('Default');
$email->template($emailtemplate);
$email->addAttachments($attachments);
try{
if ($email->send($message)) {
return true;
} else {
return false;
}
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
// public function sendMail($to, $subject, $from, $message = null, $attachments = null, $emailCofig = null, $emailtemplate = null, $formate = null, $replyto = null, $cc = null, $bcc = null, $viewVar = NULL) {
//
// ini_set('max_execution_time', 0);
//
// $emailCofig = 'default';
//
//
// if (empty($formate))
// $formate = "html";
// if (empty($from))
// $from = Configure::read('FROM_EMAIL');
//
// if (empty($replyto))
// if ($from)
// $replyto = $from;
// else
// $replyto = Configure::read('FROM_EMAIL');
//
// if (empty($emailtemplate))
// $emailtemplate = 'default';
//
// $email = new CakeEmail();
// $email->config($emailCofig);
// $email->emailFormat($formate);
// if ($from)
// $email->from(array($from));
// $email->to($to);
// $email->replyTo($replyto);
// $email->subject($subject);
//
// if (!empty($cc))
// $email->cc($cc);
// if (!empty($bcc))
// $email->bcc($bcc);
//
//
// $email->template($emailtemplate);
//
// if (!empty($viewVar))
// $email->viewVars(array('viewVars' => $viewVar));
//
// if (!empty($attachments)) {
// $email->addAttachments($attachments);
// }
// if (!empty($message)) {
// if ($email->send($message))
// return true;
// } else if ($email->send()) {
// return true;
// }
// return false;
// }
}