note 112145 added to classobj.examples

From: Date: Fri, 10 May 2013 08:11:49 +0000
Subject: note 112145 added to classobj.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-194756@lists.php.net to get a copy of this message
<?php /** * Description of bsmail class for mail send without attachment * @author BhuiyanSoft */ class bsmail { var $header; var $subject; var $message; var $sendto; public function __construct() { $this->header.='MIME-Version: 1.0'; $this->header.="\r\n"; $this->header.='Content-type: text/html; charset=iso-8859-1'; $this->header.="\r\n"; } public function subject($sub) { $this->subject=$sub; } public function from($from) { $this->header.='From: '.$from; $this->header.="\r\n"; } public function reply($reply_to) { $this->header.='Reply-To: '.$reply_to; $this->header.="\r\n"; } public function cc($cc) { $this->header.='Cc: '.$cc; $this->header.="\r\n"; } public function bcc($bcc) { $this->header.='Bcc: '.$bcc; $this->header.="\r\n"; } public function to($to) { if(is_array($to)) { for($i=0;$i<count($to);$i++) { if($i==count($to)-1) { $this->sendto.=$to[$i];} else { $this->sendto.=$to[$i].","; } } } else { $this->sendto=$to; } } public function message($mes) { $this->message=$mes; } public function attach() { return; } public function send() { $this->header.='X-Mailer: BhyiyanSoft'; return @mail($this->sendto,$this->subject,$this->message,$this->header); } } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 180.149.25.87 ---- Manual Page -- http://php.net/manual/en/classobj.examples.php Edit -- https://master.php.net/note/edit/112145 Del: integrated -- https://master.php.net/note/delete/112145/integrated Del: useless -- https://master.php.net/note/delete/112145/useless Del: bad code -- https://master.php.net/note/delete/112145/bad+code Del: spam -- https://master.php.net/note/delete/112145/spam Del: non-english -- https://master.php.net/note/delete/112145/non-english Del: in docs -- https://master.php.net/note/delete/112145/in+docs Del: other reasons-- https://master.php.net/note/delete/112145 Reject -- https://master.php.net/note/reject/112145 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194756) next »