i using a very simple phpmailer script for a contact page.
<?phpif( isset($_POST['name']) ){ $to = 'info@xxx.xxxx'; // Replace with your email $subject = $_POST['subject']; $message = $_POST['message'] . "\n\n" . 'Regards, ' . $_POST['name'] . '.'; $headers = 'From: ' . $_POST['email'] . "\r\n" . 'Reply-To: ' . $_POST['email'] . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); if( $_POST['copy'] == 'on' ) { mail($_POST['email'], $subject, $message, $headers2); }}?>but the issue is, that if copy is send, it has wrong "from" header details...so in example:
From: yakashimoto@xzy.xxReply to: yakashimoto@xzy.xxTo: yakashimoto@xzy.xxbut i needFrom: info@xxx.xxxreply to: info@xx.xxxto: yakashimoto@xyz.xx