Go Back   Webmaster Forum > Development > Programming > PHP
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 142
Join Date: Feb 2007
iTrader: (0)
Post PHP 04 : E.T. Phone Home... - 09-27-2007

I just would like to say that some hosting do not authorize the next function due to some spam...

When we make a website, we often would like to receive mail, not spam of course (we'll see later how to block some spam).

A quite simple function permit you to sending mail where you want :

PHP Code:
<?php mail($to$subject$message); ?>
Really simple isn't it ?

You can also had some header :

PHP Code:
<?php
     $to      
'myname@example.com';
     
$subject 'my subject';
     
$message 'Hello Word';
     
$headers 'From: myname@example.com' "\r\n" .
     
'Reply-To: myname@example.com' "\r\n" .
     
'X-Mailer: PHP/' phpversion();

/* Do not forget the \r\n after each line in the header*/

     
mail($to$subject$message$headers);
 
?>

That all !


Thanks,
Aqua


-------------------
http://www.aquafolie.org

Last edited by aquafolie : 09-27-2007 at 04:41 PM.
Reply With Quote
Reply


Thread Tools



PSD to HTML

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com