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

1.1     ! misho       1: --TEST--
        !             2: Bug #66535: Extra newline if add_x_header and no additional headers are used
        !             3: --INI--
        !             4: sendmail_path=tee mailBasic.out >/dev/null
        !             5: mail.add_x_header = On
        !             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() : send email without additional headers ***\n";
        !            20: 
        !            21: // Initialise all required variables
        !            22: $to = 'user@company.com';
        !            23: $subject = 'Test Subject';
        !            24: $message = 'A Message';
        !            25: 
        !            26: $outFile = "mailBasic.out";
        !            27: @unlink($outFile);
        !            28: 
        !            29: var_dump( mail($to, $subject, $message) );
        !            30: echo file_get_contents($outFile);
        !            31: unlink($outFile);
        !            32: 
        !            33: ?>
        !            34: ===DONE===
        !            35: --EXPECTF--
        !            36: *** Testing mail() : send email without additional headers ***
        !            37: bool(true)
        !            38: To: user@company.com
        !            39: Subject: Test Subject
        !            40: X-PHP-Originating-Script: %d:bug66535.php
        !            41: 
        !            42: A Message
        !            43: ===DONE===

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