Posted by John McClumpha on 11/23/05 12:37
On Wed, 23 Nov 2005 02:55:14 +0100, "Stefan Mueller"
<seekware-remove-@yahoo.com> wrote:
>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"
if you view the source of the resulting page you will find that
<user@inter.net> is there... your browser is interpreting it as an
html tag (although not a valid one) and not displaying it... if you
want to display it use < and > rather than < and >
as far as using the mail() function - the string $header you have
created will work
--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/
Navigation:
[Reply to this message]
|