1
下面的代碼被用於我的應用程序使用PHP EWS發送電子郵件到多個賬戶
$request = new \jamesiarmes\PhpEws\Request\CreateItemType();
$request->MessageDisposition = "SendOnly";
$request->SavedItemFolderId->DistinguishedFolderId->Id = "sentitems";
$request->Items->Message->ItemClass = "IPM.Note";
$request->Items->Message->Subject = "exchange new mail";
$request->Items->Message->Body->BodyType = 'HTML';
$request->Items->Message->Body->_ = "This is a test mail as a part of exchange settings set up ";
$request->Items->Message->ToRecipients->Mailbox->EmailAddress = "[email protected]";
$response = $this->app['ews']->CreateItem($request);
發送使用jamesiarmes/php-ews
電子郵件,但問題是我只能添加一個電子郵件地址作爲收件人,我怎麼可以添加ToRecipients
多個電子郵件地址?
親愛的安迪,我嘗試了你提到的問題,仍然沒有解決問題 –
謝謝安迪,它解決了我的問題 –
很高興聽到這個,有趣的編碼! :) – Andy