Changeset 916 for trunk/Packages/Common
- Timestamp:
- Dec 7, 2021, 11:08:42 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Mail.php
r887 r916 20 20 private array $Priorities; 21 21 private string $Boundary; 22 public bool $TestMode; 22 23 23 24 function __construct() … … 26 27 $this->Boundary = md5(date('r', time())); 27 28 $this->AgentIdent = 'PHP/Mail'; 29 $this->TestMode = false; 28 30 $this->Clear(); 29 31 } … … 145 147 if ($this->Subject == '') throw new Exception(T('Mail message missing Subject')); 146 148 147 $res = mail($To, $this->Subject, $Body, $Headers); 149 if ($this->TestMode) 150 { 151 echo('to: '.$To.', subject: '.$this->Subject.', body: '.$Body.', headers: '.$Headers); 152 $res = true; 153 } else 154 { 155 $res = mail($To, $this->Subject, $Body, $Headers); 156 } 148 157 return $res; 149 158 }
Note:
See TracChangeset
for help on using the changeset viewer.