SHOW:
|
|
- or go back to the newest paste.
| 1 | <? | |
| 2 | class mailclass | |
| 3 | {
| |
| 4 | public function SendMail($from, $t, $subject, $msg, $format){
| |
| 5 | $predmet = "=?utf-8?B?".base64_encode($subject)."?="; | |
| 6 | ||
| 7 | $headers = "MIME-Version: 1.0\r\n"; | |
| 8 | $headers .= "Content-Type: ".$format."; charset=UTF-8\r\n"; | |
| 9 | $headers .= "Content-Transfer-Encoding: 8bit\r\n"; | |
| 10 | $headers .= "From: ".$from." \r\n"; | |
| 11 | $headers .= "Reply-To: ".$from." \r\n"; | |
| 12 | if(!mail($t, $predmet, $msg, $headers)){
| |
| 13 | $t =error_get_last(); | |
| 14 | if($t == null){
| |
| 15 | return "a"; | |
| 16 | } | |
| 17 | return $t; | |
| 18 | }else{
| |
| 19 | return "ok"; | |
| 20 | } | |
| 21 | return "false"; | |
| 22 | } | |
| 23 | public function hello(){
| |
| 24 | - | return "hello"; |
| 24 | + | return "hellos"; |
| 25 | } | |
| 26 | } | |
| 27 | ?> |