You are here: Re: Why can't I send a mail with PHP « PHP Programming Language « IT news, forums, messages
Re: Why can't I send a mail with PHP

Posted by Gordon Burditt on 11/24/05 03:07

>>> If I use
>>> $headers .= "From: user@inter.net\n";
>>> instead of
>>> $headers .= "From: \"User\" <user@inter.net>\n";
>>> is works perfect.
>>>
>>> What's wrong?
>>> Stefan
>>
>
>I tried the following versions before
> $headers .= "From: \"User\" <user@inter.net>";
>or
> $headers .= "From: 'User' <user@inter.net>";
>or
> $headers .= "From: User <user@inter.net>";
>or
> $headers .= 'From: "User" <user@inter.net>';
>
>However, no version works.
>
>Does someone see what's wrong?

If you don't put a newline at the end of the header, another header
is going to wind up on the same line, and it will break things:

From: User <user@inter.net>Subject: this is not spam

Also, if the envelope-from and/or destination address is not valid,
the mail won't go either, regardless of headers. No HTML allowed
in those, either.

Gordon L. Burditt

 

Navigation:

[Reply to this 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

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