PHP script to send an email


6/8/02
 

send-email.php

As a way of getting started I created a simple PHP script which just sends an email to myself. Here it is:
<?php

  // A test script to send an email message to myself.

  // author = Martin Bush, South Bank University
  // date = 6th August 2002
  // filename = send-email.php3
  // version = 1.1
  // history = -

  $content_owner = "bushm@sbu.ac.uk";
  $mail_message = "If I get this it worked!\n\nNow what?!";
  mail($content_owner, "Expiry Checker: testing", $mail_message);

?>
 
This script, like all PHP scripts, needs to put into the cgi-bin directory. It is invoked by pointing a browser at this URL:
http://www.sbu.ac.uk/php-cgiwrap/~bushm/send-email.php
 
 

<<contents ^top^ next>>