0

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

2
Contributors
15
Replies
16
Views
7 Years
Discussion Span
Last Post by mmartinho
0

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

0

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?

0

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.

0

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

0

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...

0

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" />

0

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

0

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

Edited by mike_2000_17: Fixed formatting

0
<?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!'; 

}

?>
0
<?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?

0

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";

0

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

0

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 :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.