sending email in kohana

Clarence picture Clarence · Jun 18, 2012 · Viewed 8k times · Source

hi friends how to send a email through kohana 3.0

i tried but not working my code is like this

 $subject = ' : Message to Leet Street';
 $from = array('Clarence', '[email protected]');
 email::send('[email protected]', $from , $subject, 'hi how r u Brother ');
 url::redirect();

config file is:

return array
(
'default' => array(
    'transport' => 'smtp',
    'options' => array
        (
        'hostname' => 'smtp.gmail.com',
        'username' => '[email protected]',
        'password' => 'Ratna',
        'port' => '465',
    ),
)

);

thanks in advance

Answer

rm- picture rm- · Aug 5, 2012

Use this module to send email: https://github.com/shadowhand/email it needs this vendor in the vendor-dir: https://github.com/swiftmailer/swiftmailer