www.webdeveloper.com
Results 1 to 4 of 4

Thread: PHP Mail with Plesk - Not Sending/Receiving Any Emails

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    6

    PHP Mail with Plesk - Not Sending/Receiving Any Emails

    I recently got a new dedicated private server from 1&1. It has the latest version of Plesk Panel (11.5.30). On all of my webpages hosted from the server, none of them can send emails. Whenever I test this from here http://championsfunding.com/contact-us, it says that it successfully sent the email but I receive no emails at all. Here's a test PHP mail script with more detailed information: http://championsfunding.com/mail_test.php. Any help would be appreciated.

    Update 5/7/14:

    I skimmed through the mail log and found no problems except

    May 7 10:05:53 u17259487 qmail: 1399471553.284374 delivery 29: deferral: ./Maildir:_No_such_file_or_directory/
    I created the Maildir folder in the root folder and still no emails.

    Here's the log maillog.txt

  2. #2
    Join Date
    Apr 2008
    Location
    Earth
    Posts
    31
    Can you post the code that you used on the script?

  3. #3
    Join Date
    Apr 2009
    Posts
    6
    Quote Originally Posted by dclamp View Post
    Can you post the code that you used on the script?
    The script does work on another 1&1 server but not this one.

    PHP Code:
    <?php
     
        
    /*
        DONT FORGET TO DELETE THIS SCRIPT WHEN FINISHED!
        */
     
        
    ini_set'display_errors');
        
    error_reportingE_ALL );
        
        
    $from 'anonymous@u17259487.onlinehome-server.com';
        
        
    /*
        ini_set( 'SMTP', 'smtp.example.com' );
        ini_set( 'SMTP_PORT', 25 );
        ini_set( 'sendmail_from', $from );
        */
        
        
    $server = array( 
            
    'HTTP_HOST''SERVER_NAME''SERVER_ADDR''SERVER_PORT',
             
    'SERVER_ADMIN''SERVER_SIGNATURE''SERVER_SOFTWARE'
            
    'REMOTE_ADDR''DOCUMENT_ROOT''REQUEST_URI'
            
    'SCRIPT_NAME''SCRIPT_FILENAME',
        );
        
        
    $to      = ( isset( $_GET['email'] ) ? $_GET['email'] : FALSE );
        
    $subject 'Mail Test Successful for ' $_SERVER['HTTP_HOST'];
        
    $message '';
        
        if ( ! 
    $to )
        {
            echo 
    '<strong>Set $_GET[\'email\'].</strong>';
            exit;
        };
        
        foreach ( 
    $server as $s )
        {
            
    $message .= sprintf'%s: %s'$s$_SERVER[$s] ) . PHP_EOL;
        };
        
        
    $headers 'From: ' $from PHP_EOL 
             
    'Reply-To: ' $from PHP_EOL 
             
    'X-Mailer: PHP/' phpversion(); 
        
        if ( isset( 
    $_GET['send'] ) && $_GET['send'] === 'true' )
        {                    
            
    $success mail$to$subject$message$headers );
        }
        else
        {
            echo 
    '<strong>&quot;<a href="/mail_test.php?email=' $to '&send=true">'
             
    '/mail_test.php?email=' $to '&send=true</a>&quot; to send a test e-mail.</strong>';
        };
        
        if ( isset( 
    $success ) )
        {    
            echo 
    'E-mail sent to: ' $to;
            echo 
    '<br />';
            echo 
    'Successful mail?: <strong ' . ( $success 'style="color:green;">YES' 'style="color:red;">NO' ) . '</strong>';
        }
        else
        {
            echo 
    '<br />';
            echo 
    'E-mail set as: '.$to;
        };
        
        echo 
    '<hr />';    
        echo 
    '<style>    * { font-family: Helvetica, Arial, sans-serif;  } th { text-align: left; } td { padding: 3px 5px; }    </style>';
        echo 
    '<table>';    
        
        foreach ( 
    $server as $s )
        {
            echo 
    '<tr><th>$_SERVER[\'' $s '\']</th><td>' $_SERVER[$s] . '</td></tr>';
        };
        
        echo 
    '</table>';
        
        if ( isset( 
    $success ) )
        {
            echo 
    '<!--'
            
    var_dump$success );        
            echo 
    '-->';
        };
    ?>
    Last edited by stingray89; 05-08-2014 at 02:34 PM.

  4. #4
    Join Date
    Apr 2008
    Location
    Earth
    Posts
    31
    After googling some, It doesn't seem to be a problem with PHP, its a problem with the way the server was setup.

    I am not too good with server administration... Perhaps someone else could assist. Or maybe google would be of assistance. Cheers :wave:

    http://www.howtoforge.com/forums/showthread.php?t=482

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles