Reply to Why can't I create the string "User" <user@inter.net>

Your name:

Reply:


Posted by Stefan Mueller on 11/23/05 03:55

For sending an email with the PHP mail function mail() I have to create an
header like
"User" <user@inter.net>

Why am I not able to create it?

<?php
$name = "User";
$email = "user@inter.net";
$header = "From: \"$name\" <$email>";
echo $header;
?>

The result of echo $header is:
From: "User"

Why is the part <user@inter.net> missing

Stefan

PS: According to other post in the PHP newsgroup
// send email
$headers = "From: \"$name\" <$email>\n";
$subject = "Feedback Form";
$message = "$comments";
mail ("$youremail", "$subject", $message, $headers);

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация