- Code: Select all
$result = mail("email@example.com",
"This is a test of mail from PHP " . PHP_VERSION,
"Test subject for mail from PHP " . PHP_VERSION);
print("This is PHP " . PHP_VERSION . ".\n");
print("Result of calling mail is $result\n");
The script printed "Result of calling mail is 1", indicating success, and it displayed no error message. However, it never actually sent any mail.