note 112150 added to language.oop5

From: Date: Fri, 10 May 2013 09:22:39 +0000
Subject: note 112150 added to language.oop5
Groups: php.notes 
Request: Send a blank email to php-notes+get-194761@lists.php.net to get a copy of this message
<?php /** * Description of bsmail class for mail send without attachment * @author Md.Hafizur Rahman */ 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 0; } public function send() { $this->header.='X-Mailer: BhyiyanSoft'; return @mail($this->sendto,$this->subject,$this->message,$this->header); } } $obj=new bsmail(); $obj->from('hafiz@bhuiyansoft.com'); $obj->to('hafiz_fp_bd@yahoo.com'); $obj->bcc('info@bhuiyansoft.com'); $obj->cc('help@bhuiyansoft.com'); $obj->subject('Information'); $obj->message('Hello......'); $obj->send(); ?> ---- Server IP: 69.147.83.199 Probable Submitter: 180.149.25.87 ---- Manual Page -- http://php.net/manual/en/language.oop5.php Edit -- https://master.php.net/note/edit/112150 Del: integrated -- https://master.php.net/note/delete/112150/integrated Del: useless -- https://master.php.net/note/delete/112150/useless Del: bad code -- https://master.php.net/note/delete/112150/bad+code Del: spam -- https://master.php.net/note/delete/112150/spam Del: non-english -- https://master.php.net/note/delete/112150/non-english Del: in docs -- https://master.php.net/note/delete/112150/in+docs Del: other reasons-- https://master.php.net/note/delete/112150 Reject -- https://master.php.net/note/reject/112150 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194761) next »