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

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

7 Years
Discussion Span
Last Post by aithabuddy

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

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.