Jump to content

simple email issue


user4fun

Recommended Posts

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

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

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

WOWthat was a foreign language to mecan you explain more
I'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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...