Sending mail using PHP

Here is an example script for sending out mail using php:

// Please specify your Mail Server - Example:

// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.

// Please specify the return address to use
ini_set('sendmail_from', '');

// Set parameters of the email
$to = "";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "";
$headers = "From: $from";

// Mail function that sends the email.

If you are sending mail using a form on your website, we recommend you use PHP Form Mail.

Add Feedback