user4fun Posted May 24, 2007 Share Posted May 24, 2007 i use the followoing format to send email with php$to = $email; $from = " "; $title = " ";$body = <<< emailbodyemailbody; $success = mail($to,$from,$title,$body, "From:$from\r\nReply-To:an_email@----.com");No matter what i do the sender becomes listed as webmaster@------.comi need to take off that webmaster crapplease help Link to comment Share on other sites More sharing options...
vijay Posted May 24, 2007 Share Posted May 24, 2007 Hi..compare ur mail() fun's param with manual's param..bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )Regards,Vijay Link to comment Share on other sites More sharing options...
user4fun Posted May 24, 2007 Author Share Posted May 24, 2007 WOWthat was a foreign language to mecan you explain more Link to comment Share on other sites More sharing options...
jesh Posted May 24, 2007 Share Posted May 24, 2007 One of the comments on this page (http://www.php.net/function.mail) does it like this: $to = 'nobody@example.com';$subject = 'the subject';$message = 'hello';$headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers); Link to comment Share on other sites More sharing options...
zppblood Posted May 24, 2007 Share Posted May 24, 2007 WOWthat was a foreign language to mecan you explain moreI'm pretty sure he meant to compare your mail() info to php.net's example.Param=Parameter; it is also called Argument - This is the information you put in the ().bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )You will need to know your data types - string, integer, float, boolean, etc.bool - Boolean: returns true or false (1 or 0)The information inside () is the parameter(s) and data types they need to be (Number of parameters could be known by the separator ","). You will need to include to have the function work (some of them maybe optional). Link to comment Share on other sites More sharing options...
justsomeguy Posted May 29, 2007 Share Posted May 29, 2007 To clarify even further, you have this:$success = mail($to,$from,$title,$body,"From:$from\r\nReply-To:an_email@----.com");You are sending the mail function (in order) to, from, subject, body, and headers. The mail function actually takes to, subject, body, headers. The from address is not a function parameter, it goes in the headers. So your call to the mail function should look like this:$success = mail($to,$title,$body,"From:$from\r\nReply-To:an_email@----.com"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.