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

1.1     ! misho       1: --TEST--
        !             2: Test mail() function : basic functionality 
        !             3: --INI--
        !             4: sendmail_path=tee mailBasic.out >/dev/null
        !             5: mail.add_x_header = Off
        !             6: --SKIPIF--
        !             7: <?php
        !             8: if(substr(PHP_OS, 0, 3) == "WIN")
        !             9:   die("skip Won't run on Windows");
        !            10: ?>
        !            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: $outFile = "mailBasic.out";
        !            28: @unlink($outFile);
        !            29: 
        !            30: echo "-- All Mail Content Parameters --\n";
        !            31: // Calling mail() with all additional headers
        !            32: var_dump( mail($to, $subject, $message, $additional_headers) );
        !            33: echo file_get_contents($outFile);
        !            34: unlink($outFile);
        !            35: 
        !            36: echo "\n-- Mandatory Parameters --\n";
        !            37: // Calling mail() with mandatory arguments
        !            38: var_dump( mail($to, $subject, $message) );
        !            39: echo file_get_contents($outFile);
        !            40: unlink($outFile);
        !            41: 
        !            42: ?>
        !            43: ===DONE===
        !            44: --EXPECT--
        !            45: *** Testing mail() : basic functionality ***
        !            46: -- All Mail Content Parameters --
        !            47: bool(true)
        !            48: To: user@company.com
        !            49: Subject: Test Subject
        !            50: KHeaders
        !            51: 
        !            52: A Message
        !            53: 
        !            54: -- Mandatory Parameters --
        !            55: bool(true)
        !            56: To: user@company.com
        !            57: Subject: Test Subject
        !            58: 
        !            59: A Message
        !            60: ===DONE===

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