GithubHelp home page GithubHelp logo

janpak / kohana-email Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digitaljohn/kohana-email

1.0 1.0 0.0 234 KB

Email module for Kohana 3.0 framework - port of 2.3.x email helper

PHP 100.00%

kohana-email's Introduction

Email Module For Kohana 3.0

This is a direct port of the email helper from Kohana 2.3.3 source code.

It has been updated to work with SwiftMailer 4 and includes the libs dir from the 4.0.4 distribution.

Usage should be exactly as with old helper.

Methods defined:

Email::connect($config = NULL)

Creates SwiftMailer object. $config is an array of configuration values and defaults to using the config file 'email'.

Note: PopBeforeSmtp is not supported in this release as I didn't know what was required to set it up. It IS supported in Swiftmailer through the Swift_Plugins_PopBeforeSmtpPlugin plugin class. This can be used manually if required. If anyone can modify and test the connect() methd with this functionality I'll add it but I can't find documentation about how it used to work (i.e. is expected to work) so I have left it out for now.

Email::send($to, $from, $subject, $message, $html = false, $headers = array())

$to can be any of the following:

$from can be either a string email or array of email and name as above

$headers is an array of pair 'header_key' => 'header_value'

More complex email (multipart, attachments, batch mailing etc.) must be done using the native Swift_Mailer classes. The Swift Mailer autoloader is included by connect() so you can use and class in the Swift library without worrying about including files.

The Swift_Mailer object setup by connect is returned by it so if you need to access it manually use:

    $mailer = Email::connect();

    // Create complex Swift_Message object stored in $message

    $mailer->send($message);

kohana-email's People

Contributors

klinkov avatar banks avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.