| 12345678910111213141516171819202122232425262728 |
- <?php
-
- // Put here your valid email address
- $to = "dv.fortier@gmail.com";
-
- // Subject of the message
- $subject = "Test mail() function of PHP";
-
- // Body of the message, text encoded using iso-8859-1
- $message = "Hello,\nthe message was send. Regards the Webmaster\n";
-
- // Headers of the message
- $headers = ""; // we clear the variable
- $headers = "From: Postmaster <postmaster@ipsocloud.com>\n"; // Adding the From field
- // $headers = $headers."MIME-Version: 1.0\n"; // Adding the MIME version
- $headers = $headers."Content-type: text/plain; charset=iso-8859-1\n"; // Add the type of encoding
-
- // Call the mail function
- if ( mail($to, $subject, $message, $headers) == TRUE )
- {
- echo "Mail sent.";
- }
- else
- {
- echo "Error: The message could not be sent.";
- }
-
- ?>
|