You are here: RE: [PHP] Sending Mail (newbie) « PHP « IT news, forums, messages
RE: [PHP] Sending Mail (newbie)

Posted by mwestern on 11/23/05 01:41

Have you tried a very simple email example to make sure your server is
sending mail out. Is sendmail running and working?

http://au2.php.net/function.mail

> -----Original Message-----
> From: schalk [mailto:schalk@volume4.com]
> Sent: Wednesday, 23 November 2005 9:12 AM
> To: php-general@lists.php.net
> Subject: [PHP] Sending Mail (newbie)
>
> Greetings All
>
> I am using the following script to send mail via PHP. The
> script processes and send the mail but the message is never
> displayed in the received email. Any pointers will be much
> appreciated. Thank you.
>
> <?php
> // Handle POST method.
> if ($_POST)
> {
>
> $name = $_POST['name'];
> $phone = $_POST['phone'];
> $comments = $_POST['comments'];
>
> $to = 'schalk@volume4.com';
> $subject = "Contact from
> OxfordPrice.com";
> $headers = "MIME-Version: 1.0\r\n".
>
> "Content-type: text/html; charset=iso-8859-1\r\n".
> "From:
> ".$name."\r\n".
> "Date:
> ".date("r")."\r\n";
>
> // Compose message:
> $message = "
> <html>
> <body>
> <h1>Message From: " . $name .
> "</h1>
> </body>
> </html>
> ";
>
> // Send message
> mail($to, $subject, $message, $headers);
>
> // Thank the generous user
> echo "<div id=\"message-response\"><h1>Thank
> You!</h1></div>\n";
> }
>
> --
> Open WebMail Project (http://openwebmail.org)
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

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

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