Re: Adding a cc to a PHP mail script...
| From: | Anthony Ritter | Date: | Mon, 19 Nov 2001 04:31:52 +0000 |
| Subject: | Re: Adding a cc to a PHP mail script... | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10492@lists.php.net to get a copy of this message | ||
Daniel,
I tried your suggestion (see below) but the letter gets bounced back like
this:
tony@gonefishingguideservice.com,linda
.....................
Here is the script:
<?
$msg="Email sent from WWW site";
$msg.="Sender's name:\t$sender_name\n";
$msg.="Sender's email address:\t$sender_email\n";
$msg.="Message:\t$message\n\n";
$to="tony@gonefishingguideservice.com, linda@worksbyhand.com";
$subject="Web Site Feedback";
$mailheaders .= "Cc: $other_email\n";
$mailheaders="From: My Website";
$mailheaders.="Reply to: $sender_email\n\n";
mail($to,$subject,$msg,$mailheaders);
?>
<HTML>
<HEAD<
<TITLE> Simple Feedback Form </TITLE>
</HEAD>
<BODY>
<H1> The following email has been sent: </H1>
<P><strong>Your Name:</strong><br>
<? echo "$sender_name"; ?>
<P><strong>Your email address:</strong><br>
<? echo "$sender_email"; ?>
<P><strong>Message: </strong> <br>
<? echo "$message"; ?>
</BODY>
</HTML>
...................................
----- Original Message -----
From: Daniel Parsons <daniel.parsons@imlnetwork.com>
To: Anthony Ritter <tony@gonefishingguideservice.com>;
<php-windows@lists.php.net>
Sent: Sunday, November 18, 2001 8:55 PM
Subject: RE: [PHP-WIN] Adding a cc to a PHP mail script...
> If you want to add additional email addresses to the 'To' list, use a
> comma seperated list:
> e.g. $to = "tony@domain.com, bob@home.org, eve@yak.net";
>
> if you want to cc the email then add it to your headers:
> e.g. $mailheaders .= "Cc: someone@carboncopy.com\r\n";
>
> HTH,
> D.