PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
eyespark
Forum Commoner
Posts: 50 Joined: Tue Jan 24, 2006 7:36 am
Post
by eyespark » Fri Feb 03, 2006 12:15 pm
Hi
I'm sending email with this code:
Code: Select all
<? $recipient = "$friend_mail";
$send_subject = "ma subject";
$message = "my message.\n";
$headers = 'X-Mailer: PHP/' . phpversion() . "\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Return-Path: $sender_mail\r\n";
$headers .= "Reply-To: $sender_mail\r\n";
$headers .= "From: $sender_name <$sender_mail>\r\n";
$headers .= "Content-Type: text/plain; charset=utf-8\r\n\r\n";
$headers .= "Content-Transfer-Encoding: base64\r\n\r\n";
mail ($recipient, $send_subject, $message, $headers);
?>
My problem is that the first line in recieved mail body is: Content-Transfer-Encoding: base64.
Why? Is this normal?
Thanks
josh
DevNet Master
Posts: 4872 Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida
Post
by josh » Fri Feb 03, 2006 12:41 pm
because you have a double linebreak after that header, which delimiters the end of the header section of the email
eyespark
Forum Commoner
Posts: 50 Joined: Tue Jan 24, 2006 7:36 am
Post
by eyespark » Fri Feb 03, 2006 12:52 pm
Hi
I just tried your solution (erased one linedreak) but it is stil the same.
Thanks
eyespark
Forum Commoner
Posts: 50 Joined: Tue Jan 24, 2006 7:36 am
Post
by eyespark » Fri Feb 03, 2006 12:58 pm
Aaaaaah, yes! Changed Content-Transfer-Encoding to 8bit and it works.
Now I have to figure out why email goes to junk mailbox. Any ideas?
Thanks