Hello there,
I'm working on a php script where i have to send a mail with my name as sender. I want to get the mail bounced back to me in case its not delivered to the intended user.
This is the code i used for that purpose
<?php
$subject = "Hello There";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: someone1@sthg.com\r\n";
$headers .= "From: someone2@sthg.com\r\n";
$headers .= "Reply-To: someone2@sthg.com\r\n";
$headers .= "Return-Path: someone2@sthg.com\r\n";
$message = "Just a Testmail!";
$to = 'someone1@sthg.com'.',';
$to .= 'someone2@sthg.com\r\n'.',';
$from = "someone2@alcatel-lucent.com";
mail($to, $subject, $message, $headers,"-f $from");
?>
In the above mail someone1 is a non-existing id and someone2 is myself.I'm able to receive the mail,but the other person's mail should bounce back to me for which i used ,"-f $from" in the mail function.
But still i'm not getting the mail bounced.Can anybody please help me with what i have to do?
Thanks in advance,
Shara.