note 90220 added to function.mail

From: Date: Fri, 10 Apr 2009 22:41:48 +0000
Subject: note 90220 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-153063@lists.php.net to get a copy of this message
I used below code in my website, it's worked great for me! I hope help some one else for sending cc/bcc! <?php $to = 'to-email@domain.tld'; $cc = 'ccemail@domain.tld'; $bcc = 'bcc@domain.tld, bcc1@domain.tld'; $subject = 'subject'; $headers = "From: \"$from_name\" <$from_email>\r\n". "Reply-To: $from_email\r\n". "To: $to\r\n". ( (!empty($cc)) ? "Cc: $cc\r\n": "" ). ( (!empty($bcc)) ? "Bcc: $bcc \r\n" : "" ). "MIME-Version: 1.0\r\n"; $body = 'test message'; $send = mail($to, $subject, $body, $headers); if(!$send){ echo 'Mail not send'; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 193.200.150.82 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/90220 Del: integrated -- https://master.php.net/note/delete/90220/integrated Del: useless -- https://master.php.net/note/delete/90220/useless Del: bad code -- https://master.php.net/note/delete/90220/bad+code Del: spam -- https://master.php.net/note/delete/90220/spam Del: non-english -- https://master.php.net/note/delete/90220/non-english Del: in docs -- https://master.php.net/note/delete/90220/in+docs Del: other reasons-- https://master.php.net/note/delete/90220 Reject -- https://master.php.net/note/reject/90220 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153063) next »