Guys,

Appreciate if anybody can help me.
I have a send_mail.php on my site that works great.
The point is that I want a copy of all sending emails to be redirected also in one of my postbox. I need this to track what is going on, and what kind of messages are sending.
So I need script that also redirect this emails in my email too.

Thanks in advance

Simple. Just add on you script on from field you email with bcc and all emails will be copyed to you.

Simple. Just add on you script on from field you email with bcc and all emails will be copyed to you.

Can you please show me exactly the script, I am not a programmer?

The script is yours not mine. You tell that you have a file named send_mail.php.. Post year the content they will need some changes.

The script is yours not mine. You tell that you have a file named send_mail.php.. Post year the content they will need some changes.

OK, thanks anyway.
All the best

OK, thanks anyway.
All the best

I can do it for you but i need code of send_mail.php. Post here de file or the content and i change it for you...

I can do it for you but i need code of send_mail.php. Post here de file or the content and i change it for you...

You mean this?


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

You mean this?


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

No. A script that send emails like you say is stored on a file named send_mail.php. Put here the content of the file

No. A script that send emails like you say is stored on a file named send_mail.php. Put here the content of the file

if ($_POST['submitForm'] == "yes") {
//echo "select email from tbl_add where id='".$_REQUEST['aid']."'";
      $sql_email=mysql_query("select email from tbl_add where id='".$_REQUEST['aid']."'");
      $res_email=mysql_fetch_array($sql_email);
        $headers  = 'MIME-Version: 1.0' . "\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
        $headers .= "From: $name <".$email. ">\n";
        $subject = "You have received a new Message on DaDa.Com!";
        $message ="Email: $email<br>Sender: $name<br>Subject: $subject1<br><br>".nl2br($comment)."<br><br>If you feel this message is spam, please contact DaDa.Com Customer Service: [email]support@dada.com[/email]<br><br>Thank you for using DaDa.Com.";
        //mail("dada@gmail.com","fff",$message,$headers);
        //echo $email.'<br>'.$res_email['email'].'<br>'.$subject.'<br>'.$message.'<br>'.$res_email['email'];
        @mail($res_email['email'], $subject, $message, $headers);
        //cust_send_mail($res_email['email'],$emailto_name,$subject,$message,$email,$email,true);
        //cust_send_mail("dada@gmail.com",$emailto_name,$subject,$message,$email,$email,true);
        //@mail("dada@gmail.com", $subject, $message, $headers);
        $_SESSION['sess_msg']='Message send successfully!'; 

}

OK I got you, this is the sending form

<?php

if ($_POST['submitForm'] == "yes") {
	//echo "select email from tbl_add where id='".$_REQUEST['aid']."'";
	$sql_email=mysql_query("select email from tbl_add where id='".$_REQUEST['aid']."'");
	$res_email=mysql_fetch_array($sql_email);
	
	$headers = 'MIME-Version: 1.0' . "\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
	$headers .= "From: $name <".$email. ">\n";
	$headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";
	
	$subject = "You have received a new Message on DaDa.Com!";
	
	$message ="Email: $email<br>Sender: $name<br>Subject: $subject1<br><br>".nl2br($comment)."<br><br>If you feel this message is spam, please contact DaDa.Com Customer Service: support@dada.com<br><br>Thank you for using DaDa.Com.";
	
	//mail("dada@gmail.com","fff",$message,$headers);
	//echo $email.'<br>'.$res_email['email'].'<br>'.$subject.'<br>'.$message.'<br>'.$res_email['email'];
	@mail($res_email['email'], $subject, $message, $headers);
	//cust_send_mail($res_email['email'],$emailto_name,$subject,$message,$email,$email,true);
	//cust_send_mail("dada@gmail.com",$emailto_name,$subject,$message,$email,$email,true);
	//@mail("dada@gmail.com", $subject, $message, $headers);
	
	$_SESSION['sess_msg']='Message send successfully!'; 

}

?>
<?php

if ($_POST['submitForm'] == "yes") {
	//echo "select email from tbl_add where id='".$_REQUEST['aid']."'";
	$sql_email=mysql_query("select email from tbl_add where id='".$_REQUEST['aid']."'");
	$res_email=mysql_fetch_array($sql_email);
	
	$headers = 'MIME-Version: 1.0' . "\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
	$headers .= "From: $name <".$email. ">\n";
	$headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";
	
	$subject = "You have received a new Message on DaDa.Com!";
	
	$message ="Email: $email<br>Sender: $name<br>Subject: $subject1<br><br>".nl2br($comment)."<br><br>If you feel this message is spam, please contact DaDa.Com Customer Service: support@dada.com<br><br>Thank you for using DaDa.Com.";
	
	//mail("dada@gmail.com","fff",$message,$headers);
	//echo $email.'<br>'.$res_email['email'].'<br>'.$subject.'<br>'.$message.'<br>'.$res_email['email'];
	@mail($res_email['email'], $subject, $message, $headers);
	//cust_send_mail($res_email['email'],$emailto_name,$subject,$message,$email,$email,true);
	//cust_send_mail("dada@gmail.com",$emailto_name,$subject,$message,$email,$email,true);
	//@mail("dada@gmail.com", $subject, $message, $headers);
	
	$_SESSION['sess_msg']='Message send successfully!'; 

}

?>

So this is the changes I see right?
$headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";

Add this on script?

on this code

if ($_POST['submitForm'] == "yes") {
	//echo "select email from tbl_add where id='".$_REQUEST['aid']."'";
	$sql_email=mysql_query("select email from tbl_add where id='".$_REQUEST['aid']."'");
	$res_email=mysql_fetch_array($sql_email);
	
	$headers = 'MIME-Version: 1.0' . "\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
	$headers .= "From: $name <".$email. ">\n";
	$headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";
	
	$subject = "You have received a new Message on DaDa.Com!";
	
	$message ="Email: $email<br>Sender: $name<br>Subject: $subject1<br><br>".nl2br($comment)."<br><br>If you feel this message is spam, please contact DaDa.Com Customer Service: support@dada.com<br><br>Thank you for using DaDa.Com.";
	
	//mail("dada@gmail.com","fff",$message,$headers);
	//echo $email.'<br>'.$res_email['email'].'<br>'.$subject.'<br>'.$message.'<br>'.$res_email['email'];
	@mail($res_email['email'], $subject, $message, $headers);
	//cust_send_mail($res_email['email'],$emailto_name,$subject,$message,$email,$email,true);
	//cust_send_mail("dada@gmail.com",$emailto_name,$subject,$message,$email,$email,true);
	//@mail("dada@gmail.com", $subject, $message, $headers);
	
	$_SESSION['sess_msg']='Message send successfully!'; 

}

change your bcc email ate $headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";

on this code

if ($_POST['submitForm'] == "yes") {
	//echo "select email from tbl_add where id='".$_REQUEST['aid']."'";
	$sql_email=mysql_query("select email from tbl_add where id='".$_REQUEST['aid']."'");
	$res_email=mysql_fetch_array($sql_email);
	
	$headers = 'MIME-Version: 1.0' . "\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
	$headers .= "From: $name <".$email. ">\n";
	$headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";
	
	$subject = "You have received a new Message on DaDa.Com!";
	
	$message ="Email: $email<br>Sender: $name<br>Subject: $subject1<br><br>".nl2br($comment)."<br><br>If you feel this message is spam, please contact DaDa.Com Customer Service: support@dada.com<br><br>Thank you for using DaDa.Com.";
	
	//mail("dada@gmail.com","fff",$message,$headers);
	//echo $email.'<br>'.$res_email['email'].'<br>'.$subject.'<br>'.$message.'<br>'.$res_email['email'];
	@mail($res_email['email'], $subject, $message, $headers);
	//cust_send_mail($res_email['email'],$emailto_name,$subject,$message,$email,$email,true);
	//cust_send_mail("dada@gmail.com",$emailto_name,$subject,$message,$email,$email,true);
	//@mail("dada@gmail.com", $subject, $message, $headers);
	
	$_SESSION['sess_msg']='Message send successfully!'; 

}

change your bcc email ate $headers .= 'Bcc: yourmailhere@mail.com' . "\r\n";

Buddy you are great man, that works perfect.

God bless you :)
Thanks a lot
All the best

Buddy you are great man, that works perfect.

God bless you :)
Thanks a lot
All the best

Let me know if I can do something for you. Some marketing, some advertising in facebook twitter etc.

Just let me know :)

Don't worry about that :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.