| Line |   | 
|---|
| 1 | <?php
 | 
|---|
| 2 | 
 | 
|---|
| 3 | class Mail
 | 
|---|
| 4 | {
 | 
|---|
| 5 |   var $Subject;
 | 
|---|
| 6 |   var $Content;
 | 
|---|
| 7 |   var $RecipientAddress;
 | 
|---|
| 8 |   var $RecipientName;
 | 
|---|
| 9 |   var $SenderAddress;
 | 
|---|
| 10 |   var $SenderName;
 | 
|---|
| 11 |   var $AdditionalHeaders;
 | 
|---|
| 12 | 
 | 
|---|
| 13 |   function Send()
 | 
|---|
| 14 |   {
 | 
|---|
| 15 |     $this->AdditionalHeaders['To'] = $this->RecipientName.' <'.$this->RecipientAddress.'>';
 | 
|---|
| 16 |     $this->AdditionalHeaders['From'] = $this->SenderName.' <'.$this->SenderAddress.'>';
 | 
|---|
| 17 |     $this->AdditionalHeaders['MIME-Version'] = '1.0';
 | 
|---|
| 18 |     $this->AdditionalHeaders['Content-type'] = 'text/html; charset=UTF-8';
 | 
|---|
| 19 |     foreach($this->AdditionalHeaders as $Index => $Item)
 | 
|---|
| 20 |     {
 | 
|---|
| 21 |       $Headers .= $Index.': '.$this->EncodeBase64($Item)."\r\n";
 | 
|---|
| 22 |     }
 | 
|---|
| 23 |     $Subject = $this->EncodeBase64($this->Subject);
 | 
|---|
| 24 |     return(mail($this->Address, $Subject, $this->Content, $Headers));
 | 
|---|
| 25 |   }
 | 
|---|
| 26 | 
 | 
|---|
| 27 |   function EncodeBase64($Text)
 | 
|---|
| 28 |   {
 | 
|---|
| 29 |     return('=?UTF-8?B?'.base64_encode($this->Subject).'?=');
 | 
|---|
| 30 |   }
 | 
|---|
| 31 | }
 | 
|---|
| 32 | 
 | 
|---|
| 33 | ?>
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.