web 2.0

How to use PHP & Send Email Cc and Bcc

How to use PHP & Send Email Cc and Bcc This the tutorial/example a scripts how to use PHP and send mail/email Cc and Bcc from php Scirpt.

ShotDev Focus:
- PHP & Send Mail (Cc and Bcc)

Example

php_sendmail_cc_bcc.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
$strTo = "member@shotdev.com";
$strSubject = "Test sending mail.";
$strHeader = "From: Mr.Weerachai Nukitram<webmaster@shotdev.com>\n ";
$strHeader .= "Cc: Mr.Surachai Sirisart<surachai@shotdev.com>\n ";
$strHeader .= "Bcc: webmaster@shotdev.com";
$strMessage = "My Body & My Description";
$flgSend = mail($strTo,$strSubject,$strMessage,$strHeader);  // @ = No show error //
if($flgSend)
{
echo "Mail send completed.";
}
else
{
echo "Cannot send mail.";
}
?>
</body>
</html>

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_sendmail_cc_bcc.php

Screenshot

PHP Send Mail (Cc and Bcc)

PHP Send Mail (Cc and Bcc)
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.