This is a very simple Yii smtp component.
'import' => array(
'application.extensions.simple-smtp.*',
),
'components' => array(
'mailer' => array(
'class' => 'Smtp',
'debug' => true,
'relay_host' => 'smtp.test.loc',
'smtp_port' => 25,
'time_out' => 30,
'auth' => true,
'host_name' => 'localhost',
'log_file' => '',
'sock' => false,
'user' => '[email protected]',
'pass' => '*****',
),
),
$subject = "A test mail from leiswork";
$message = "Hello world!!";
$to = '[email protected]';
$mailtype = "HTML";
Yii::app()->mailer->sendmail($to, $subject,$message, $mailtype, "utf-8");