easy-mail Small component for sending emails.

  1. Mail
  2. Requirements
  3. Usage

Mail

Small component for sending emails. Allows you to define multiple views, which may receive specific parameters to be used in it. Allows sending to multiple recipients.

Requirements

Yii 1.x

Usage

1) Extract content in your extensions directory

2) Configure the parameters according to your server and SMTP account parameters in "function init()" of Mail.php.

public function init() {
    $this->mail = new PHPMailer();
    $this->mail->Host = 'example.com';
    $this->mail->Username = 'email@example.com';
    $this->mail->Password = 'password';
    $this->mail->Mailer = 'smtp';
    $this->mail->Port = 465;
    $this->mail->SMTPAuth = true;
    $this->mail->SMTPSecure = 'ssl';
    $this->mail->CharSet = 'utf-8';
    $this->mail->ContentType = 'text/html';
}

3) Call the widget

<?php Yii::app()->controller->widget('ext.easy-mail.Mail', 
      array(
          'view' => 'testView',
          'params' => array(
              'to' => array(
                  'email@example.com' => 'Name'
              ),
             'content' => array(
                 'param1' => 'Value1',
                 'paramN' => 'ValueN'
             ),
             'subject' => 'Subject of email'
         )
     )); ?>  
Important notes:

Variables can be used in templates using the following convention $params['content']['param1']

0 0
2 followers
538 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Mail
Developed by: rafaelt88
Created on: Mar 4, 2015
Last updated: 9 years ago

Downloads

show all

Related Extensions