| @@ 59-68 (lines=10) @@ | ||
| 56 | try { |
|
| 57 | // Encode recipient names (but not any numeric array indexes) |
|
| 58 | $recipients = array(); |
|
| 59 | foreach ($this->_recipients as $name => $email) { |
|
| 60 | // Support Bcc header |
|
| 61 | if (isset($this->_header_fields['Bcc']) && $this->_header_fields['Bcc'] == $email) { |
|
| 62 | continue; |
|
| 63 | } |
|
| 64 | ||
| 65 | // if the key is not numeric, qEncode the key. |
|
| 66 | $name = General::intval($name) > -1 ? General::intval($name) : EmailHelper::qEncode($name); |
|
| 67 | $recipients[$name] = $email; |
|
| 68 | } |
|
| 69 | ||
| 70 | // Combine keys and values into a recipient list (name <email>, name <email>). |
|
| 71 | $recipient_list = EmailHelper::arrayToList($recipients); |
|
| @@ 76-85 (lines=10) @@ | ||
| 73 | ||
| 74 | // Encode recipient names (but not any numeric array indexes) |
|
| 75 | $recipients = array(); |
|
| 76 | foreach ($this->_recipients as $name => $email) { |
|
| 77 | // Support Bcc header |
|
| 78 | if (isset($this->_header_fields['Bcc']) && $this->_header_fields['Bcc'] == $email) { |
|
| 79 | continue; |
|
| 80 | } |
|
| 81 | ||
| 82 | // if the key is not numeric, qEncode the key. |
|
| 83 | $name = General::intval($name) > -1 ? General::intval($name) : EmailHelper::qEncode($name); |
|
| 84 | $recipients[$name] = $email; |
|
| 85 | } |
|
| 86 | ||
| 87 | // Combine keys and values into a recipient list (name <email>, name <email>). |
|
| 88 | $recipient_list = EmailHelper::arrayToList($recipients); |
|