35 $this->_transport = $transport;
46 return new self($transport);
70 $failedRecipients = (array) $failedRecipients;
72 if (!$this->_transport->isStarted())
74 $this->_transport->start();
77 return $this->_transport->send($message, $failedRecipients);
103 &$failedRecipients = null,
106 $failedRecipients = (array) $failedRecipients;
109 $to = $message->
getTo();
110 $cc = $message->
getCc();
111 $bcc = $message->
getBcc();
115 $message->
setCc(array());
119 $message->
setBcc(array());
125 while ($it->hasNext())
127 $message->
setTo($it->nextRecipient());
128 $sent += $this->
send($message, $failedRecipients);
133 foreach ($to as $address => $name)
135 $message->
setTo(array($address => $name));
136 $sent += $this->
send($message, $failedRecipients);
140 $message->
setTo($to);
144 $message->
setCc($cc);
162 $this->_transport->registerPlugin($plugin);