I have code here for a form that submits the data to receivers email. When I click the send this form button, it submits the email to receivers address. Following is the code that i'm using to send email

function send_mail_users($myname, $myemail, $contactname, $contactemail, $subject, $message)
{
	$headers .= "MIME-Version: 1.0\n";
	$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
	$headers .= "X-Priority: 3\n";
	$headers .= "X-MSMail-Priority: Normal\n";
	$headers .= "Return-Path: <".$myemail.">\n";
	$headers .= "X-Mailer: php\n";
	$headers .= "From: \"".$myname."\" <".mail@example.com.">\n";
	$headers .= "Reply-To: \"".$myname."\" <".$myemail.">\n";
	return(mail("\"".$contactname."\" <".$contactemail.">", $subject, $message, $headers, "-f$myemail"));
}

send_mail_users("senders_name", "senders@gmail.com", "receivers_name", "receivers@domain.com", "subject", "message");

in the above code i'm sending mail from my mail server "mail@example.com" to receivers mail address, with reply-to address as "senders@gmail.com". The email sent successful to receivers email address, but it's not working for auto generated emails from some email addresses.

Can any one help me regarding auto generated emails

Thank you in advance

Please clarify what "...but it's not working for auto generated emails from some email addresses." means (with some examples of what works and what doesn't).

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.