Annotation of embedaddon/php/ext/standard/tests/mail/mail_basic2.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test mail() function : basic functionality 
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if(substr(PHP_OS, 0, 3) == "WIN")
        !             6:   die("skip Won't run on Windows");
        !             7: ?>
        !             8: --INI--
        !             9: sendmail_path="sed > /tmp/php_test_mailBasic2.out"
        !            10: mail.add_x_header = Off
        !            11: --FILE--
        !            12: <?php
        !            13: /* Prototype  : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
        !            14:  * Description: Send an email message 
        !            15:  * Source code: ext/standard/mail.c
        !            16:  * Alias to functions: 
        !            17:  */
        !            18: 
        !            19: echo "*** Testing mail() : basic functionality ***\n";
        !            20: 
        !            21: 
        !            22: // Initialise all required variables
        !            23: $to = 'user@company.com';
        !            24: $subject = 'Test Subject';
        !            25: $message = 'A Message';
        !            26: $additional_headers = 'KHeaders';
        !            27: $additional_parameters = "-e '5 a--- Extras'";
        !            28: $outFile = "/tmp/php_test_mailBasic2.out";
        !            29: @unlink($outFile);
        !            30: 
        !            31: echo "-- extra parameters --\n";
        !            32: // Calling mail() with all possible arguments
        !            33: var_dump( mail($to, $subject, $message, $additional_headers, $additional_parameters) );
        !            34: 
        !            35: echo file_get_contents($outFile);
        !            36: unlink($outFile);
        !            37: ?>
        !            38: ===DONE===
        !            39: --EXPECT--
        !            40: *** Testing mail() : basic functionality ***
        !            41: -- extra parameters --
        !            42: bool(true)
        !            43: To: user@company.com
        !            44: Subject: Test Subject
        !            45: KHeaders
        !            46: 
        !            47: A Message
        !            48: --- Extras
        !            49: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>