shadowline
Email - Basics >> Email - Multiple Recipients
PHP makes sending information to an email rather easy. It takes one main command :

mail ("recipient","subject","message");

The first value is an email address. Where the information is going to be sent to.

The second value is a short sentense or note. It will appear in the SUBJECT field of the email.

The third value is the main body message.
Note Check with your host if they support the mail command. There must be a specified working local mail server in the php.ini file to work.

Values can be entered directly into the mail command.

<?php
mail("yourplace@somewhere.com","My email test.","Hello, how are you?");
?>

Many people prefer to use variables to pass the information into it.

<?php
$to = "yourplace@somewhere.com";
$subject = "My email test.";
$message = "Hello, how are you?";

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

To know if the email was successfully sent out, an IF command can be used on the mail command. The mail command produces a positive result upon success.

<?php
$to = "yourplace@somewhere.com";
$subject = "My email test.";
$message = "Hello, how are you?";

if ( mail($to,$subject,$message) ) {
   echo "The email has been sent!";
   } else {
   echo "The email has failed!";
   }
?>

The further email tutorial pages will build onto this example. Change the values to your own, save it it as a php file, upload and test it on your hosted space. Viewing the page, the script will automatically go and send an email. If it works, you are ready to continue further.
Email - Basics >> Email - Multiple Recipients
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow