JOB TO GIVE: fix php mail() error

Discussion in 'Services' started by myseo, May 21, 2008.

  1. #1
    Hi there,

    I got a server which is setup on Debian Linux and controlled by Webmin as a control panel. Now the problem I have is that when sending emails by php using the mail() function it takes like ages until the mail is sent (I am talking about minutes instead of milliseconds as it should be).

    Now I need a serveradmin to fix that problem. My guess would be it´s because there is no smtp-server installed and that php mail() probably somehow needs the smtp-server, but then I am not sure, since I am not really into server admin.

    So basically what you should do is find the reason for that problem and fix it...

    I guess that job should be easily done within an hour for someone that knows a little about server admin (other than me)...

    I would be happy to receive bids by PM :)
     
    myseo, May 21, 2008 IP
  2. CollyMellon

    CollyMellon Peon

    Messages:
    749
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    You should probably get this moved to the PHP section under programming.

    I would post the code your using for the sendmail function, this may be the problem as the server is doing it's job if your recieving the email.
     
    CollyMellon, May 21, 2008 IP
  3. myseo

    myseo Member

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    the code is rather simple ;)

    it´s

    <?
    mail ($send_to, $headline, $message, $emailheader);
    ?>

    even if I use e.g. only that for a script
    <?
    echo time();
    mail ("myemail@domain.com", "testmail", "testmail");
    echo "done";
    echo time();
    ?>

    it takes like a minute until "done" is displayed...
    here is a sample output:
    command line: php test.php
    output:
    1211388955done1211389016


    job still open :)
     
    myseo, May 21, 2008 IP
  4. myseo

    myseo Member

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    UPDATE: I installed postfix now and the delay is gone.... so that shouldn´t be a problem any more, allthough no emails are delivered, since postfix obviously isn´t configured correctly... so job would be now to configure postfix correctly so that mailing works...
     
    myseo, May 21, 2008 IP