RON_ron Posted October 12, 2009 Share Posted October 12, 2009 Email coding problem. I need to send a section of the info to $tf and the same as a Cc to $email and also I need the full info to be sent to [email protected]. how to do that? summery: only selected Info: name / address Subject: AAA TO: $tf Cc: $email Full Info: name / address / phone / date Subject: BBB To: [email protected] Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/ Share on other sites More sharing options...
jamesxg1 Posted October 12, 2009 Share Posted October 12, 2009 Email coding problem. I need to send a section of the info to $tf and the same as a Cc to $email and also I need the full info to be sent to [email protected]. how to do that? summery: only selected Info: name / address Subject: AAA TO: $tf Cc: $email Full Info: name / address / phone / date Subject: BBB To: [email protected] http://uk3.php.net/manual/en/function.mail.php Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935622 Share on other sites More sharing options...
RON_ron Posted October 12, 2009 Author Share Posted October 12, 2009 COde so far. I'M NOT RECEIVING $ft $to = "[email protected]"; $subject = "heading"; $headers = "From:" .$email."\r\n"; $message = "ABC Request"; $message = "Name: " . $thename; $message .= "\n\nCompany or Club Name: " . $thecompany; $message .= "\n\nAddress: " . $theaddress; $message .= "\n\nRequired Date: " . $thedate; $message .= "\n\nPhone: " . $phone; $message .= "\n\nEmail: " . $email; $sentOk = mail("$email",$subject,$message,$headers); echo "sentOk=" . $sentOk; $to = "$ft"; $subject = "heading"; $headers = "From:" .$email."\r\n"; $headers .= Cc: $email"\r\n"; $message = "Thank you customer"; $message = "Name: " . $thename; $message .= "\n\nCompany or Club Name: " . $thecompany; $sentOk = mail("$email",$subject,$message,$headers); echo "sentOk=" . $sentOk; >? Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935631 Share on other sites More sharing options...
RON_ron Posted October 12, 2009 Author Share Posted October 12, 2009 Please someone help... Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935657 Share on other sites More sharing options...
lemmin Posted October 12, 2009 Share Posted October 12, 2009 What is in your $email variable? You can name as many recipients as you want, just separate them by commas: $email = "[email protected], [email protected], [email protected]"; mail($email, $subject, $message, $headers); Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935670 Share on other sites More sharing options...
RON_ron Posted October 12, 2009 Author Share Posted October 12, 2009 My requirement is 1. one email sould have all the info ([email protected]) 2. THe two other emails should have only few (essential info). ($ft, $email) 3. $ft & $email should not see [email protected] Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935678 Share on other sites More sharing options...
lemmin Posted October 12, 2009 Share Posted October 12, 2009 You would have to send two emails: mail($email, $subject, $fullmessage, [...] mail($otheremails, $subject, $othermessage, [...] Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935685 Share on other sites More sharing options...
RON_ron Posted October 12, 2009 Author Share Posted October 12, 2009 That's what I've done so far. But I'm not receiving $ft. CODE: //mail 1 $to = "[email protected]"; $subject = "heading"; $headers = "From:" .$email."\r\n"; $message = "ABC Request"; $message = "Name: " . $thename; $message .= "\n\nCompany or Club Name: " . $thecompany; $sentOk = mail("$email",$subject,$message,$headers); echo "sentOk=" . $sentOk; //mail 2 $to = "$ft"; $subject = "heading"; $headers = "From:" .$email."\r\n"; $headers .= Cc: $email"\r\n"; $message = "Thank you customer"; $message = "Name: " . $thename; $sentOk = mail("$email",$subject,$message,$headers); echo "sentOk=" . $sentOk; >? Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935686 Share on other sites More sharing options...
RON_ron Posted October 12, 2009 Author Share Posted October 12, 2009 lemmin! You are correct. My eyes couldn't see the error! it was in my second mail. $sentOk = mail("$email",$subject,$message,$headers); THANKS A LOT LEMMIN!!!! by the way are you a M or F? Link to comment https://forums.phpfreaks.com/topic/177448-solved-coding-problem/#findComment-935693 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.