You are here: Re: sending mail « PHP Language « IT news, forums, messages
Re: sending mail

Posted by peter on 05/27/07 12:02

>I am just starting out and working with a tutorial on php mail
> I used this to send mail but didn't receive anything in my mail
> Sould I be looking to setup something in PHP 5.0 to fix this problem?
>
> <?php
> $file_loc = "mydata.txt";
> $whattoread = fopen($file_loc, "r");
>
> $file_contents = fread($whattoread, filesize($file_loc));
> fclose($whattoread);
>
> $mailheaders = "From: my web site <> ";
> mail("kraleigh@sbcglobal.net", "File contents", $file_contents,
> $mailheaders);
> echo ("check your mail");
>
>
> ?>
>

Going by your other post you are using a windows box. You will need to edit
the php.ini file and enable/change the smtp configuration. Also try sending
an email without any headers etc and a generic title and content.

In your example code you have not put any newlines after the header (\r\n)
but if you do as I suggested first you will ensure that the setup is correct
before bringing in complications.

 

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

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