1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

php email script not work on plesk 8.3

Discussion in 'Plesk for Linux - 8.x and Older' started by milanello, May 5, 2008.

  1. milanello

    milanello Guest

    0
     
    Hi guys

    i have bought a new server with plesk 8.3
    an email works fine

    but this script php not works


    <?php

    $to = 'test@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: admin@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    $result = mail($to, $subject, $message, $headers);
    print $result;

    ?>


    someone can help me?
     
  2. Pnia

    Pnia Guest

    0
     
    try adding:
    $headers.='MIME-Version: 1.0\r\n';
    $headers.='Date: ' . date('r', time()) . '\r\n';

    I think you need more headers.
     
  3. milanello

    milanello Guest

    0
     
    thanks for the reply

    but the problem.. is on the server
    because this script works fine in a plesk 8.0 machine

    this script was create from cs-cart support, for test the machine (because the php via mail doesn't works).
    they said me that my server probably... have some setting to check
     
  4. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    the script works fine on my server...

    have you any errors in the apache or mail logs ?
     
  5. milanello

    milanello Guest

    0
     
    thank you very much.. for the test...

    this is the log from apache


    [Mon May 05 17:16:50 2008] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Mon May 05 17:16:50 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Mon May 05 17:16:51 2008] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
    [Mon May 05 17:16:51 2008] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
    [Mon May 05 17:16:51 2008] [warn] Init: SSL server IP/port conflict: default-xx-xx-201-161:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
    [Mon May 05 17:16:51 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
    [Mon May 05 17:16:51 2008] [notice] Digest: generating secret for digest authentication ...
    [Mon May 05 17:16:51 2008] [notice] Digest: done
    [Mon May 05 17:16:51 2008] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
    [Mon May 05 17:16:51 2008] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
    [Mon May 05 17:16:51 2008] [warn] Init: SSL server IP/port conflict: default-xx-xx-201-161:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
    [Mon May 05 17:16:51 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
    [Mon May 05 17:16:51 2008] [notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.2.4 mod_ssl/2.2.6 OpenSSL/0.9.8b mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    qmail-inject: fatal: read error
    qmail-inject: fatal: read error



    i have dr.web on the server
     
Loading...