Date: 10/24/02
- Next message: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Previous message: Peter Beckman: "Re: [PHP-DB] search field into MySQL"
- Next in thread: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Maybe reply: joakim.andersson <email protected>: "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sorry for the <OFFTOPIC> post all but I am really stuck to get this
done.
I can't for the life figure this out.
I have a from header set in one piece of code that gets emailed to the
merchant. Here si the code:
$to = "$merchant_email";
$subject = "New Order on Rinkrake.com";
$long_date = date("r",time());
$headers = "Date: $long_date\r\n";
$headers .= "To: $to\r\n";
$headers .= "X-Mailer: SOME MAIL SERVER\r\n";
$headers = "Return-Path: <$support_email>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: multipart/mixed;
boundary=\"Message-Boundary\"\r\n";
$headers .= "Content-transfer-encoding: 7BIT\r\n";
$headers .= "X-attachments: $attach_name\r\n";
$headers .= "--Message-Boundary\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-transfer-encoding: 7BIT\r\n";
$headers .= "$message\r\n";
$headers .= "\n\n--Message-Boundary\r\n";
$headers .= "Content-type: $attach_type; name=\"$attach_name\"\r\n";
$headers .= "Content-Transfer-Encoding: BASE64\r\n";
$headers .= "Content-disposition: attachment;
filename=\"$attach_name\"\n\r\n";
$headers .= "$encoded_attach\r\n";
$headers .= "--Message-Boundary--\r\n";
$headers .= "From: $name <".$orderResult['email'].">\r\n";
mail($to, "$subject", "", $headers);
The above ALL works except the From header. What I get is the email
account of the web user username <username <email protected>>
Now... I have another piece of code that I send to the customer (not the
merchant) that looks like this:
$headers = "Return-Path: <$support_email>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: The RinkRake <$merchant_email>\r\n";
mail ($orderResult["email"],"Your Order on Rinkrake.com", $message,
$headers);
This piece of code comes through with NO "from" problems. Its formatted
as it should be.
Does anyone have any thoughts?
Are there only so many headers I can use which is why it doesn't come
through in the first one?
Thanks all.
Aaron
- Next message: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Previous message: Peter Beckman: "Re: [PHP-DB] search field into MySQL"
- Next in thread: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Maybe reply: joakim.andersson <email protected>: "RE: [PHP-DB] From address in mail() header not working - ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

