View Single Post
Old 26-06-2009, 22:29   #10
Keyz333
Inactive
 
Join Date: Oct 2007
Location: Fleet, Hampshire
Age: 35
Services: Cuckoo (BT) Broadband
Posts: 265
Keyz333 has a spectacular aura about themKeyz333 has a spectacular aura about themKeyz333 has a spectacular aura about themKeyz333 has a spectacular aura about them
Send a message via AIM to Keyz333 Send a message via MSN to Keyz333
Re: Automatic mail on PHP web page?

Something like this should suit your needs, It has the From Function & checks to see if it sends or not.

PHP Code:
<?php
$to 
"Your@Emailhere.com";
$subject "The Subject";
$body "EG - Someone has Visited Your Website";
$from "someonelse@example.com";
$headers "From: $from";
if (
mail($to$subject$body$headers)) {
  echo(
"<p>Message successfully sent!</p>");
 } else {
  echo(
"<p>Message delivery failed...</p>");
 }
?>
Keyz333 is offline   Reply With Quote