Thule - 0.9.6
  • Welcome
  • Introduction
  • - MVC(Model-View-Controller)
    - Architecture of Framework
    - Flow Chart of Application
    - Services In One Server
    - Developing Guide
    - Features
  • Installation
  • Getting Started
  • - Direct Access HTTP
    - Router Access HTTP
    - Router Direct Access HTTP
    - Reserved Function
    - Convention
    - Bootstrap
    - Pack Javascript , CSS
  • Basic Modules
  • - Model
    - View
    - Controller
  • Libraries
  • - Router
    - Config
    - Response
    - Request
    - Database
    - Query
    - Cache
    - Debug
    - Log
    - Unit Test
    - Registry
    - Profile
  • Helper
  • - Auth
    - Calendar
    - Date
    - Error page
    - Email
    - Form
    - GeoIP
    - Google
    - Html Element
    - Html
    - Http
    - I18n
    - Image
    - Json
    - Jquery
    - Login
    - Layout
    - Locale
    - PHP to Javascript
    - Paging
    - Payflow
    - Soap
    - Text
    - Table
    - Uri
    - Upload
    - Validation
  • Plugins
  • - Smarty Template Engine
  • History
  • Home > Email

    Email helper is very useful when you send a email with html and just message , you can choose multiple receiptions. and "cc" , "bcc" etc..
    Message is seperated with html and you can make your own several html page for message and choose to send.
    sample email formats are included in views/include directory,below is one of them.

    Sample email format


    views/include/sample_email_format1.html

    <html>
    <head>
    <title>Sample Email 2</title>
    </head>
    <body>
    <?php echo $hi ?>
    <?php echo $to ?>
    </body>
    </html>

    How to use direct send email


    Below is a sample for using email.

    $this->loadHelper('email');
    $emailInfo=array('to'=>'hello@example.com','subject'=>MAIL_SUBJECT, 'message'=>MAIL_MESSAGE);
    $this->Email->sendHtml($emailInfo);

    How to use send email with HTML


    If you have a look at Email Helper , you can find more information for useful things.

    $message=array("hi"=>"Hello","to"=>"Every one");
    $emailInfo=array('to'=>'hello@example.com','subject'=>MAIL_SUBJECT,'message'=> $message,'emailformat'=>MAIL_EMAILFORMAT);
    $this->Email->sendHtml($emailInfo);