Send email

April 13th, 2009 | Tags:

Tutorial Description:

Learn how to use PHP to send emails.

To send emails using PHP, we’ll be using the mail() function.

The following is an example you can use to send emails.

<?php

// define email settings...
$to = "user@domain.com";
$subject = "Test Email Subject";
$message = "This is a test email message";

// Shorten lines longer then 50 characters.
$message = wordwrap($message, 50);

// send email.
mail($to, $subject, $message);

?>

No comments yet.
TOP