Posted by Stefan Mueller on 11/23/05 18:30
> 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
You are great guy
I tried it almost the whole night - without success. Now I get
From: "User" <user@inter.net>
and that's really what I like to have. Many thanks.
Hmmm, I don't exactly understand why my browser was interpreting it as a
html tag. I think a PHP is running on the server side and not on the browser
side. Isn't it?
And anyway it was in "...". I don't understand, but it works.
However, I'm still not able to send an email
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "From: \"User\" <user@inter.net>\n";
$headers .= "Bcc: user2@inter.net\n";
The output of
echo $header
is like expected
MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 From:
"User" <user@inter.net> Bcc: user2@inter.net
The error message on my PHP server says:
[23-Nov-2005 17:12:40] PHP Warning: mail() [<a
href='function.mail'>function.mail</a>]: SMTP server response: 501 5.5.4
Invalid Address in C:\WWW\php\file.php on line 132
What's wrong? If I use
$headers .= "From: user@inter.net\n";
instead of
$headers .= "From: \"User\" <user@inter.net>\n";
is works perfect.
Stefan
Navigation:
[Reply to this message]
|