php - Sending multiple emails in YII using YiiMail extension -


i using yiimail extension send mails. have default contact.php file view. able send mails individuals multiple emails not allowed here.

mycontroller-

public function actioncontact() {     $model=new contactform;     if(isset($_post['contactform']))     {     $message = new yiimailmessage;     $message->body=$_post['body'];     $message->subject = $_post['subject']     $message->addto($_post['email']);     $message->from = "frommail@gmail.com";     if(yii::app()->mail->send($message) )         echo 'mail sent';     else         echo 'error while sending email';     } } 

i have tried following too-

foreach ($model $value) {             $message->addto($model[$value]); } 

it not accept multiple email id's. how can resolved?

i have checked code in yii mailer. haven't given such facility. if achieve need extend yii mail. it's useless because looping in new extended class or looping in controller same.

regards...


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -