CApplicationComponent | --YiiMail
Located in File: /YiiMail.php
You may configure it as below. Check the public attributes and setter methods of this class for more options.
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 ), ... ) );
Example usage:
$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);
$dryRun = false (line 57)
$logging = true (line 51)
$mailer (line 98)
$transport (line 93)
$transportOptions (line 88)
$transportType = 'php' (line 64)
$viewPath = 'application.views.mail' (line 70)
Static Method log (line 189)
Method batchSend (line 158)
This differs from send() in the way headers are presented to the recipient. The only recipient in the "To:" field will be the individual recipient it was sent to.
If an iterator is provided, recipients will be read from the iterator one-by-one, otherwise recipient data will be retreived from the YiiMailMessage object.
Sender information is always read from the YiiMailMessage object.
The return value is the number of recipients who were accepted for delivery.
Method getMailer (line 226)
Method getTransport (line 203)
not been created yet
Method init (line 105)
Method registerScripts (line 236)
Method send (line 130)
All recipients (with the exception of Bcc) will be able to see the other recipients this message was sent to.
If you need to send to each recipient without disclosing details about the other recipients see batchSend().
Recipient/sender data will be retreived from the YiiMailMessage object.
The return value is the number of recipients who were accepted for delivery.
Method sendSimple (line 172)