Annotation of embedaddon/php/ext/standard/tests/mail/mail_variation2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test mail() function : variation force extra parameters
3: --INI--
4: sendmail_path="sed > /tmp/php_test_mailVariation2.out"
5: mail.force_extra_parameters="-e4a---forced-params"
6: mail.add_x_header = Off
7: --SKIPIF--
8: <?php
9: if(substr(PHP_OS, 0, 3) == "WIN")
10: die("skip Won't run on Windows");
11: ?>
12: --FILE--
13: <?php
14: /* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
15: * Description: Send an email message
16: * Source code: ext/standard/mail.c
17: * Alias to functions:
18: */
19:
20: echo "*** Testing mail() : basic functionality ***\n";
21:
22:
23: // Initialise all required variables
24: $to = 'user@company.com';
25: $subject = 'Test Subject';
26: $message = 'A Message';
27: $outFile = "/tmp/php_test_mailVariation2.out";
28: @unlink($outFile);
29:
30: var_dump( mail($to, $subject, $message) );
31: echo file_get_contents($outFile);
32: unlink($outFile);
33:
34: ?>
35: ===DONE===
36: --EXPECT--
37: *** Testing mail() : basic functionality ***
38: bool(true)
39: To: user@company.com
40: Subject: Test Subject
41:
42: A Message
43: ---forced-params
44: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>