Tutorials
Sending a simple text email php script
Jan 18th
We begin with simple email. It use basic function, mail().
To understand how to send a simple email, you can look following code:
<?php // Email address destination and subject $to = 'example@website.com'; $subject = 'Test Email '; // Define the headers we want passed. //Note that they are separated by \r\n $headers = "From: me@mysite.com\r\nX-Mailer: php"; // Your message here: $body = "Hi there!.\n\nHello World!\n\nBest regards,\n\nTester."; // Send the email @mail($to, $subject, $body, $headers); ?>

(1 votes, average: 4.00 out of 5)