smtp-mail I created one SMTP mail extension using phpmailer class

  1. Add the SMTP Details in main.php
  2. Create Mailfunction

Add the SMTP Details in main.php

Download the extension and add it into protected/extension folder. Now configure the smtp details in protected/config/main.php


Create Mailfunction

public function mailsend($to,$from,$subject,$message){
        $mail->SetFrom($from, 'From NAme');
        $mail->Subject    = $subject;
        $mail->AddAddress($to, "");
        if(!$mail->Send()) {
            echo "Mailer Error: " . $mail->ErrorInfo;
        }else {
            echo "Message sent!";
3 0
6 299 downloads
Yii Version: 1.1
License: GPL-3.0
Category: Mail
Tags: mail, mailer, smtp
Developed by: mbala
Created on: Feb 27, 2013
Last updated: 5 years ago
Update Extension
Manage Downloads


show all

Related Extensions