Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

SendMail Problem

Archer282Archer282 Posts: 243Member
i have configured PHP 4.3.1, MySQL 3.23.49, and Apache on my home pc
when i try to use the mail() function on it, it gives me this error
[code]
Warning: mail() [function.mail]: Failed to connect to mailserver
at "localhost" port 25, verify your "SMTP" and "smtp_port"
setting in php.ini or use ini_set()...
[/code]

i know there is nothing wrong with the code, is it just not possible to send mail from my server? or could something not be set up right?

Comments

  • JonathanJonathan Posts: 2,914Member
    : i have configured PHP 4.3.1, MySQL 3.23.49, and Apache on my home pc
    : when i try to use the mail() function on it, it gives me this error
    : [code]
    : Warning: mail() [function.mail]: Failed to connect to mailserver
    : at "localhost" port 25, verify your "SMTP" and "smtp_port"
    : setting in php.ini or use ini_set()...
    : [/code]
    :
    : i know there is nothing wrong with the code, is it just not possible
    : to send mail from my server? or could something not be set up right?

    You say you're running it on your home PC, and my guess is that you are not running an SMTP server on your home PC. Thus why it can't connect to it. You could either install an SMTP server or, more simply (and sensibly), put in php.ini the address and details of your ISP's SMTP server.

    If you do run an SMTP server on your home PC, please make sure relay is turned off and you keep up on security patches for it, so you don't become a distributor of SPAM for some dodgy organisation (or individual) selling products that claim to give you a bigger...anyways...good luck. :-)

    Hope this helps,

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • Archer282Archer282 Posts: 243Member
    : : i have configured PHP 4.3.1, MySQL 3.23.49, and Apache on my home pc
    : : when i try to use the mail() function on it, it gives me this error
    : : [code]
    : : Warning: mail() [function.mail]: Failed to connect to mailserver
    : : at "localhost" port 25, verify your "SMTP" and "smtp_port"
    : : setting in php.ini or use ini_set()...
    : : [/code]
    : :
    : : i know there is nothing wrong with the code, is it just not possible
    : : to send mail from my server? or could something not be set up right?
    :
    : You say you're running it on your home PC, and my guess is that you are not running an SMTP server on your home PC. Thus why it can't connect to it. You could either install an SMTP server or, more simply (and sensibly), put in php.ini the address and details of your ISP's SMTP server.
    :
    : If you do run an SMTP server on your home PC, please make sure relay is turned off and you keep up on security patches for it, so you don't become a distributor of SPAM for some dodgy organisation (or individual) selling products that claim to give you a bigger...anyways...good luck. :-)
    :
    : Hope this helps,
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
    :
    :
    ok i thought something like could be the problem.
    i use MSN dial-up so how could i find the the address and details or where could i download an SMTP server?

  • Archer282Archer282 Posts: 243Member
    : : : i have configured PHP 4.3.1, MySQL 3.23.49, and Apache on my home pc
    : : : when i try to use the mail() function on it, it gives me this error
    : : : [code]
    : : : Warning: mail() [function.mail]: Failed to connect to mailserver
    : : : at "localhost" port 25, verify your "SMTP" and "smtp_port"
    : : : setting in php.ini or use ini_set()...
    : : : [/code]
    : : :
    : : : i know there is nothing wrong with the code, is it just not possible
    : : : to send mail from my server? or could something not be set up right?
    : :
    : : You say you're running it on your home PC, and my guess is that you are not running an SMTP server on your home PC. Thus why it can't connect to it. You could either install an SMTP server or, more simply (and sensibly), put in php.ini the address and details of your ISP's SMTP server.
    : :
    : : If you do run an SMTP server on your home PC, please make sure relay is turned off and you keep up on security patches for it, so you don't become a distributor of SPAM for some dodgy organisation (or individual) selling products that claim to give you a bigger...anyways...good luck. :-)
    : :
    : : Hope this helps,
    : :
    : : Jonathan
    : :
    : : ###
    : : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
    : :
    : :
    : ok i thought something like could be the problem.
    : i use MSN dial-up so how could i find the the address and details or where could i download an SMTP server?
    :
    :
    i found the address to the MSN SMTP server and i set it and the port using the ini_set(); and now its giving me this error


    [code]
    Warning: mail() [function.mail]: SMTP server response: 450 5.7.3
    Requested action aborted; mailbox unavailable in...
    [/code]

    did i miss something here, does msn not allow it
  • JonathanJonathan Posts: 2,914Member
    : : ok i thought something like could be the problem.
    : : i use MSN dial-up so how could i find the the address and details
    : : or where could i download an SMTP server?
    : :
    : :
    : i found the address to the MSN SMTP server and i set it and the port
    : using the ini_set(); and now its giving me this error
    :
    :
    : [code]
    : Warning: mail() [function.mail]: SMTP server response: 450 5.7.3
    : Requested action aborted; mailbox unavailable in...
    : [/code]
    :
    : did i miss something here, does msn not allow it
    Maybe MSN doesn't allow it, after all, it's MSN. ;-) It may be you need to specify outgoing mail authentication settings in your php.ini file (a username and password for the SMTP server). How you do that, I wouldn't know; consult the docs. Or you may just have spaces to pop them into already in php.ini, I don't know. Have you got access to any other SMTP servers you can try it on?

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.