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 26 27echo "-- failure --\n"; 28 29var_dump( mail($to, $subject, $message) ); 30?> 31===DONE=== 32--EXPECT-- 33*** Testing mail() : basic functionality *** 34-- failure -- 35bool(false) 36===DONE=== 37