Changeset 460 for trunk/Common/Mail.php
- Timestamp:
- Nov 5, 2012, 10:12:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Mail.php
r438 r460 41 41 } 42 42 43 function AddToCombined($Address) 44 { 45 $this->Recipients[] = array('Address' => $Address, 'Type' => 'SendCombined'); 46 } 47 43 48 function AddTo($Address, $Name) 44 49 { … … 100 105 foreach($this->Recipients as $Index => $Recipient) 101 106 { 107 if($Recipient['Type'] == 'SendCombined') 108 { 109 if($Index > 0) $To .= ', '; 110 $To .= $Recipient['Address']; 111 } else 102 112 if($Recipient['Type'] == 'Send') 103 113 { … … 119 129 120 130 $this->Headers['Mime-Version'] = '1.0'; 121 if(count($this->Attachments) == 0)122 {123 $this->Headers['Content-Type'] = $this->Bodies[0]['Type'].'; charset='.$this->Bodies[0]['Charset'];124 $this->Headers['Content-Transfer-Encoding'] = $this->ContentEncoding($this->Bodies[0]['Charset']);125 }126 131 127 132 if($this->AgentIdent != '') $this->Headers['X-Mailer'] = $this->AgentIdent; … … 169 174 private function BuildAttachment($Body) 170 175 { 171 if(count($this->Attachments > 0))172 { 176 if(count($this->Attachments) > 0) 177 { 173 178 $this->Headers['Content-Type'] = "multipart/mixed;\n boundary=\"PHP-mixed-".$this->Boundary."\""; 174 175 179 $Result = "This is a multi-part message in MIME format.\n". 176 180 "--PHP-mixed-".$this->Boundary."\n"; … … 206 210 $Result = ''; 207 211 if(count($this->Bodies) > 1) 212 { 213 $this->Headers['Content-Type'] = 'multipart/alternative; boundary="PHP-alt-'.$this->Boundary.'"'; 208 214 $Result .= 'Content-Type: multipart/alternative; boundary="PHP-alt-'.$this->Boundary.'"'. 209 215 "\n\n"; 216 } else 217 { 218 $this->Headers['Content-Type'] = $this->Bodies[0]['Type'].'; charset='.$this->Bodies[0]['Charset']; 219 $this->Headers['Content-Transfer-Encoding'] = $this->ContentEncoding($this->Bodies[0]['Charset']); 220 } 221 210 222 211 223 foreach($this->Bodies as $Body)
Note:
See TracChangeset
for help on using the changeset viewer.