Send Mail Function :Cake
function sendMail($To, $Subject, $msg, $From, $smtp="1")
{
$this->Email->to = $To;
$this->Email->from = $From;
$this->Set("message", $msg);
$this->Email->subject = $Subject;
$this->Email->template = "default";
$this->Email->sendAs = 'both';
if($smtp == 1)
{
$this->Email->smtpOptions = array(
'port'=>'25',
'timeout'=>'30',
'host' => 'relay.airtelbroadband.in',
'username'=>$From,
'password'=>'octal123'
);
$this->Email->delivery = 'smtp';
}
$this->Email->delivery = 'smtp';
if($this->Email->send($msg))
{
return true;
}
else
{
return false;
}
}
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home