Links & Resources

Home
Tutorial
CSV To XML
Email Scripts
Form to email
Newsletter
Email this page
Captcha
Display a Table

sponsored link

sponsored link

Email Scripts

Email are sent on the internet using SMTP. This protocol is base on the original Arpanet standards which date back to the 1970s (see RFC 524) and can send only text only. To get round the need to send images and other binary data MIME (see RFC2045) was invented in late 1990s. The senders mail program converts the binary data from the image file into a long string of text using a system called Base 64 encoding this is so called because it uses 64 characters namely the upper and lower case alphabets, numbers and the characters + and /.

The PHP mail function requires email addresses of the sender and the recipient, the subject and also the text of the message.

In it's simplest form it is :

<?php
$Recipient="you@example.com;
$Subject="Subject";
$Message="Message";
$Headers="From: me@example.com\r\n";
mail($Recipient, $Subject, $Message, $Headers);
?>

To send a multipart message is however much more complex as can be seen in the newsletter page.