st3fanus
(St3fanus Solution)
1
Hi… I’m stefanus
I want to ask about anyone who have success with problem.
This is my steps which i already done :
-
I use mail SwiftMailer wrapper extension from http://www.yiiframework.com/extension/mail
-
This my code in config/main.php
- This my code on controller :
This is my first attemption to use this extension or sending email experience in php.
I’ve tried to run this, and i still get an error like this :
I tried to open YiiMailMessage.php on line 112 like above error told, this is :
Is there anyone can explain me or give me suggestion ??
Thanks a lot
foe_1
(foe#1)
2
qwerty
(qwerty)
3
Hi,
you should have:
'import => array(
'ext.mail.YiiMailMessage',
),
In line:
'class' => 'application.extensions.YiiMailMessage',
I think, that is missing folder with mail extension and should like
'class' => 'application.extensions.mail.YiiMail',
Doc from extension:
/**
* YiiMail is an application component used for sending email.
*
* You may configure it as below. Check the public attributes and setter
* methods of this class for more options.
* <pre>
* return array(
* ...
* 'import => array(
* ...
* 'ext.mail.YiiMailMessage',
* ),
* 'components' => array(
* 'mail' => array(
* 'class' => 'ext.yii-mail.YiiMail',
* 'transportType' => 'php',
* 'viewPath' => 'application.views.mail',
* 'logging' => true,
* 'dryRun' => false
* ),
* ...
* )
* );
* </pre>
*
* Example usage:
* <pre>
* $message = new YiiMailMessage;
* $message->setBody('Message content here with HTML', 'text/html');
* $message->subject = 'My Subject';
* $message->addTo('johnDoe@domain.com');
* $message->from = Yii::app()->params['adminEmail'];
* Yii::app()->mail->send($message);
* </pre>
*/