Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', TRUE);
- $from = "mail@smartmusicbulbfor.me";
- $ccs = "sitnic.victor@gmail.com";
- $headers = "MIME-Version: 1.0 \r\n";
- $headers .= "Content-type: text/html; charset=utf-8 \r\n";
- $headers .="From: $from\r\n";
- $headers .="Cc: $ccs\r\n";
- $headers .="X-Mailer: php";
- //trigger exception in a "try" block
- try {
- $x = mail("leazysunrise@gmail.com", "subject", "message", $headers);
- echo 'If you see this, the mail must be sended';
- }
- //catch exception
- catch(Exception $e) {
- echo 'Message: ' .$e->getMessage();
- }
Add Comment
Please, Sign In to add comment