Changeset 566 for branches/1.1dev/lib
- Timestamp:
- Oct 28, 2016 12:03:20 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/Email.inc.php
r310 r566 8 8 * @author Quinn Comendant <quinn@strangecode.com> 9 9 * @version 1.0 - backported to codebase v1.1dev 10 * 11 10 * 11 12 12 // Example. 13 13 $email = new Email(array( … … 30 30 } 31 31 32 * 32 * 33 33 */ 34 34 class Email { … … 41 41 'headers' => null, 42 42 'regex' => null, 43 43 44 44 // A single carriage return (\n) should terminate lines for locally injected mail. 45 45 // A carriage return + line-feed (\r\n) should be used if sending mail directly with SMTP. 46 46 'crlf' => "\n", 47 47 48 48 // RFC 2822 says line length MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF. 49 49 // http://mailformat.dan.info/body/linelength.html … … 187 187 function replace($replacements) 188 188 { 189 189 190 190 // Ensure template exists. 191 191 if (!isset($this->_template)) { … … 209 209 // Search and replace all values at once. 210 210 $this->_template_replaced = str_replace($search, $replace, $this->_template); 211 212 return $this->_template_replaced; 211 213 } 212 214 … … 255 257 $final_body = isset($this->_template_replaced) ? $this->_template_replaced : $this->_template; 256 258 if (false !== $this->getParam('wrap')) { 257 $final_body = wordwrap($final_body, $this->getParam('line_length'), $this->getParam('crlf')); 259 $final_body = wordwrap($final_body, $this->getParam('line_length'), $this->getParam('crlf')); 258 260 } 259 261 … … 287 289 $envelope_sender_header = sprintf('-f %s', $envelope_sender_address); 288 290 } else { 289 $envelope_sender_header = ''; 291 $envelope_sender_header = ''; 290 292 } 291 293
Note: See TracChangeset
for help on using the changeset viewer.