1--TEST-- 2Test mail() function : basic functionality 3--INI-- 4sendmail_path="exit 1" 5--SKIPIF-- 6<?php 7if(substr(PHP_OS, 0, 3) == "WIN") 8 die("skip Won't run on Windows"); 9?> 10--FILE-- 11<?php 12/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) 13 * Description: Send an email message 14 * Source code: ext/standard/mail.c 15 * Alias to functions: 16 */ 17 18echo "*** Testing mail() : basic functionality ***\n"; 19 20 21// Initialise all required variables 22$to = 'user@example.com'; 23$subject = 'Test Subject'; 24$message = 'A Message'; 25 26echo "-- failure --\n"; 27var_dump( mail($to, $subject, $message) ); 28?> 29===DONE=== 30--EXPECT-- 31*** Testing mail() : basic functionality *** 32-- failure -- 33bool(false) 34===DONE=== 35