Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The person with Bcc: receives the Mail, but he can´t see that he´s Bcc. Just able to see the real to but nothing else.
The second problem is Reply-To:. If you want to answer you don´t know who to write..

HTML
<form method='POST' action='' enctype='multipart/form-data'>
<table id='row'>
	<tr>
		<td><select id="to" name='to[]'>
			<option value='To:'>to:</option>
			<option value='Cc:'>CC:</option>
			<option value='Bcc:'>BCC:</option>
			<option value='Reply-To:'>Reply-To:</option>
			<select></td><td><input type='text' id='adr' name='mail[]'><input type='button' onclick='newAdres ()' value='+'></td>
	</tr>


PHP
$art = array();
	$art = $_POST['to'];
	$bet=$_POST['betr'];
	$text=$_POST['text'];
	$to = array();
	$to=$_POST['mail'];
	$header = array();
	$header[] = "From: me < me@nnn.com >";
	$header[] = "MIME-Version: 1.0";
	$header[] = "Content-type: text/plain; charset=iso-8859-1";
	$header[] = "X-Mailer: PHP/".phpversion();
	
	$i=0;
	while (isset($art[$i])){ //Header (Bcc, Cc,... )
		$j=$i+4;
		$header[$j] = "$art[$i] $to[$i]";
		$i++;
	}
mail(null,$bet, $text, implode("\r\n", $header));
Posted
Updated 25-Mar-14 1:18am
v2
Comments
vbmike 25-Mar-14 15:04pm    
I could be wrong but Bcc is acting as intended. No one can see the Bcc, as it is a blind copy. The bcc recipient would simply click reply. The reply-to would simply be a matter of clicking "reply" or "reply to all". If you wanted a different address in the reply to box you would code that yourself. You have probably see this already: "https://github.com/PHPMailer/PHPMailer"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900