TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
sending email in kohana using shadowhand's module
  • greetings, so basically I searched on ways to send email in kohana 3.3 and ended up with this module https://github.com/shadowhand/email and I believe I should also put https://github.com/swiftmailer/swiftmailer in the module's vendor folder . what I dont get it where should I put all of this in my kohana project and how to actually use it . thanks in advance .

  • thank you for trying to help WinterSilence but I read the readme before . what I meant is where to put the class folders ... though seems I already succeeded . my problem now is it seems I cant set the config file. I am using

    'driver' => 'smtp',
    'options' => array('hostname'=>'smpt.gmail.com','username'=>'myemail@gmail.com','password'=>'blablabla','port'=>'465','encryption'=>'ssl')
    

    though it states it cant connect to the hostname .

  • smtp.gmail.com - typo per your other post

    You could also get a free SMTP account at http://mandrillapp.com

  • with gmail you have to use an other port.

    
    return array (
    
        'driver' => 'smtp',
    
        'options' =>  array(
            'hostname'   =>'smtp.gmail.com',
            'port'       =>'587',
            'username'   =>'email',
            'password'   =>'password',
            'encryption' => 'tls',
        ),
    );
    
    
  • smtp.gmail.com - typo per your other post

    oops xD thanks for pointing this out . just another question I dont understand now that I have my mailer working . if in the config file the username is the email that I use to send the mails ... what is the use of the email i write in the from() ?

    $email = Email::factory('Hello, World', 'This is my body, it is nice.')
            ->from('thatmail@gmail.com')
            ->to('receiver@gmail.com')->send()
  • You set the user/email in the config file in order to authenticate with the SMTP server.

    Setting an email in the from function will set the email message FROM header.

  • Setting an email in the from function will set the email message FROM header

    strange cause whatever email I write in the from function the mail is always sent from the email of the config file .

  • I am not sure about that... probably the way GMail SMTP server is configured.

  • Seriously, get an account at http://mandrillapp.com so you can have better control of your outbound (SMTP) email -- it's free for 12,000 emails a month. Gmail does all sorts of strange things to your headers plus it's almost impossible to track which messages get delivered and which do not

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion