function mandrill_get_to in Mandrill 6
Same name and namespace in other branches
- 8 mandrill.module \mandrill_get_to()
- 7.2 mandrill.module \mandrill_get_to()
- 7 mandrill.module \mandrill_get_to()
Helper to generate an array of recipients.
Parameters
mixed $to:
Return value
array
2 calls to mandrill_get_to()
- MandrillMailSystem::mail in ./
mandrill.mail.inc - Send the email message.
- TestingMandrillMailSystem::mail in ./
mandrill.mail.inc - Accept an e-mail message and store it in a variable.
File
- ./
mandrill.mail.inc, line 190 - Class for sending mails via Mandrill.
Code
function mandrill_get_to($to) {
//@todo: extract name and add to associative array.
$recipients = array();
if ($to_array = explode(',', $to)) {
foreach ($to_array as $email) {
$recipients[] = array(
'email' => $email,
);
}
}
else {
$recipients[] = array(
'email' => $to,
);
}
return $recipients;
}