Ticket #167 (new enhancement)
Opened 3 months ago
Solar_Mail_Message::setTo()
| Reported by: | rodrigo moraes <rodrigo.moraes@…> | Owned by: | pmjones |
|---|---|---|---|
| Priority: | trivial | Component: | code |
| Keywords: | Solar_Mail_Message | Cc: |
Description
Hey, I was wondering if it would make sense to have a setTo() method in Solar_Mail_Message, useful to send the same message individually to different recipients without rebuilding the message for each recipient. For example, see how we could define a single message and send it multiple times:
<?php $message = Solar::factory('Solar_Mail_Message'); $message->setFrom($from); $message->setSubject($subj); $message->setText($text); $emails = array( // list of destination emails... ); $transport = Solar::factory('Solar_Mail_Transport'); foreach ($emails as $email) { $message->setTo($email); $transport->send($message); } ?>
Does it make sense?
Attachments
Note: See
TracTickets for help on using
tickets.
