CakeEmail
- class CakeEmail(mixed $config = null)
CakeEmail is a new class to send email. With this class you can send email from any place of your application. In addition to using the EmailComponent from your controller, you can also send mail from Shells, and Models.
This class replaces the EmailComponent and gives more flexibility in sending emails. For example, you can create your own transports to send email instead of using the provided smtp and mail.
Create a function
- public function smpt_mail()
- {
- $this->Email->sendAs = ‘html’;
- $this->Email->from = “abc”;
- $this->Email->to = ‘abc@xyz.com’;
- $this->Email->subject = “test mal”;
- $this->Email->smtpOptions = array(
- ‘port’=>‘465’,
- ‘timeout’=>’30’,
- ‘host’ => ‘ssl://smtp.gmail.com’,
- ‘username’=>‘gmail id ‘,
- ‘password’=>‘gmail passwrd’,
- );
- $this->Email->delivery = ‘smtp’;
- if ($this->Email->send($body)) {
- return 1;
- } else {
- echo $this->Email->smtpError;
- }
- }
Now call in any controller .
if you use this function in custom components then include this line
- public $components = array(‘Cookie’,‘Session’,‘Email’);
Finally i quit my regular job, now i earn a lot of money
on-line you should try too, just type in google – blackhand
roulette system
Hello, you post interesting content on your blog, you can get
much more visitors, just search in google for – augo’s tube traffic