You are here: Re: Newbie needs help with mail function « PHP SQL « IT news, forums, messages
Re: Newbie needs help with mail function

Posted by ZeldorBlat on 02/18/07 21:40

On Feb 18, 2:34 pm, raj <r...@nospam.com> wrote:
> Hi,
>
> I've got so far with the mail() function but it won't work. Please help.
> WHere am I going wrong?
>
> Kind regards,
>
> Raj (Newbie)
>
> $to="d...@ghi.com";
> $email_system="a...@def.com";
> $message="Hi";
> $headers = "From: ".$email_system."\n";
> $headers .= "Reply-To: <".$email_system.">\n";
> $headers .= "X-Sender: <".$email_system.">\n";
> $headers .= "X-Mailer: PHP4\n"; //mailer
> $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
> $headers .= "Return-Path: <".$email_system.">\n";
> mail($to,"Verify Email Address for Hi", $message, $headers);

What do you mean by "it won't work?" As in PHP gives you an error?
As in the email never gets there? You need to be more specific.

In any case, your various headers need to be seperated by \r\n not
just \n. And don't include the Reply-To, X-Sender, X-Mailer, X-
Priority, or Return-Path headers -- you don't really need them in your
case.

 

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

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